LCOV - code coverage report
Current view: top level - home/czgdp18079/Quansight/scipy/build/scipy/sparse/csgraph/_matching.cpython-312-x86_64-linux-gnu.so.p - _matching.c (source / functions) Hit Total Coverage
Test: lcov.info Lines: 4077 10774 37.8 %
Date: 2024-11-20 10:49:04 Functions: 109 322 33.9 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* Generated by Cython 3.0.11 */
       2             : 
       3             : #ifndef PY_SSIZE_T_CLEAN
       4             : #define PY_SSIZE_T_CLEAN
       5             : #endif /* PY_SSIZE_T_CLEAN */
       6             : #if defined(CYTHON_LIMITED_API) && 0
       7             :   #ifndef Py_LIMITED_API
       8             :     #if CYTHON_LIMITED_API+0 > 0x03030000
       9             :       #define Py_LIMITED_API CYTHON_LIMITED_API
      10             :     #else
      11             :       #define Py_LIMITED_API 0x03030000
      12             :     #endif
      13             :   #endif
      14             : #endif
      15             : 
      16             : #include "Python.h"
      17             : #ifndef Py_PYTHON_H
      18             :     #error Python headers needed to compile C extensions, please install development version of Python.
      19             : #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
      20             :     #error Cython requires Python 2.7+ or Python 3.3+.
      21             : #else
      22             : #if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API
      23             : #define __PYX_EXTRA_ABI_MODULE_NAME "limited"
      24             : #else
      25             : #define __PYX_EXTRA_ABI_MODULE_NAME ""
      26             : #endif
      27             : #define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME
      28             : #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
      29             : #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
      30             : #define CYTHON_HEX_VERSION 0x03000BF0
      31             : #define CYTHON_FUTURE_DIVISION 1
      32             : #include <stddef.h>
      33             : #ifndef offsetof
      34             :   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
      35             : #endif
      36             : #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
      37             :   #ifndef __stdcall
      38             :     #define __stdcall
      39             :   #endif
      40             :   #ifndef __cdecl
      41             :     #define __cdecl
      42             :   #endif
      43             :   #ifndef __fastcall
      44             :     #define __fastcall
      45             :   #endif
      46             : #endif
      47             : #ifndef DL_IMPORT
      48             :   #define DL_IMPORT(t) t
      49             : #endif
      50             : #ifndef DL_EXPORT
      51             :   #define DL_EXPORT(t) t
      52             : #endif
      53             : #define __PYX_COMMA ,
      54             : #ifndef HAVE_LONG_LONG
      55             :   #define HAVE_LONG_LONG
      56             : #endif
      57             : #ifndef PY_LONG_LONG
      58             :   #define PY_LONG_LONG LONG_LONG
      59             : #endif
      60             : #ifndef Py_HUGE_VAL
      61             :   #define Py_HUGE_VAL HUGE_VAL
      62             : #endif
      63             : #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
      64             : #if defined(GRAALVM_PYTHON)
      65             :   /* For very preliminary testing purposes. Most variables are set the same as PyPy.
      66             :      The existence of this section does not imply that anything works or is even tested */
      67             :   #define CYTHON_COMPILING_IN_PYPY 0
      68             :   #define CYTHON_COMPILING_IN_CPYTHON 0
      69             :   #define CYTHON_COMPILING_IN_LIMITED_API 0
      70             :   #define CYTHON_COMPILING_IN_GRAAL 1
      71             :   #define CYTHON_COMPILING_IN_NOGIL 0
      72             :   #undef CYTHON_USE_TYPE_SLOTS
      73             :   #define CYTHON_USE_TYPE_SLOTS 0
      74             :   #undef CYTHON_USE_TYPE_SPECS
      75             :   #define CYTHON_USE_TYPE_SPECS 0
      76             :   #undef CYTHON_USE_PYTYPE_LOOKUP
      77             :   #define CYTHON_USE_PYTYPE_LOOKUP 0
      78             :   #if PY_VERSION_HEX < 0x03050000
      79             :     #undef CYTHON_USE_ASYNC_SLOTS
      80             :     #define CYTHON_USE_ASYNC_SLOTS 0
      81             :   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
      82             :     #define CYTHON_USE_ASYNC_SLOTS 1
      83             :   #endif
      84             :   #undef CYTHON_USE_PYLIST_INTERNALS
      85             :   #define CYTHON_USE_PYLIST_INTERNALS 0
      86             :   #undef CYTHON_USE_UNICODE_INTERNALS
      87             :   #define CYTHON_USE_UNICODE_INTERNALS 0
      88             :   #undef CYTHON_USE_UNICODE_WRITER
      89             :   #define CYTHON_USE_UNICODE_WRITER 0
      90             :   #undef CYTHON_USE_PYLONG_INTERNALS
      91             :   #define CYTHON_USE_PYLONG_INTERNALS 0
      92             :   #undef CYTHON_AVOID_BORROWED_REFS
      93             :   #define CYTHON_AVOID_BORROWED_REFS 1
      94             :   #undef CYTHON_ASSUME_SAFE_MACROS
      95             :   #define CYTHON_ASSUME_SAFE_MACROS 0
      96             :   #undef CYTHON_UNPACK_METHODS
      97             :   #define CYTHON_UNPACK_METHODS 0
      98             :   #undef CYTHON_FAST_THREAD_STATE
      99             :   #define CYTHON_FAST_THREAD_STATE 0
     100             :   #undef CYTHON_FAST_GIL
     101             :   #define CYTHON_FAST_GIL 0
     102             :   #undef CYTHON_METH_FASTCALL
     103             :   #define CYTHON_METH_FASTCALL 0
     104             :   #undef CYTHON_FAST_PYCALL
     105             :   #define CYTHON_FAST_PYCALL 0
     106             :   #ifndef CYTHON_PEP487_INIT_SUBCLASS
     107             :     #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
     108             :   #endif
     109             :   #undef CYTHON_PEP489_MULTI_PHASE_INIT
     110             :   #define CYTHON_PEP489_MULTI_PHASE_INIT 1
     111             :   #undef CYTHON_USE_MODULE_STATE
     112             :   #define CYTHON_USE_MODULE_STATE 0
     113             :   #undef CYTHON_USE_TP_FINALIZE
     114             :   #define CYTHON_USE_TP_FINALIZE 0
     115             :   #undef CYTHON_USE_DICT_VERSIONS
     116             :   #define CYTHON_USE_DICT_VERSIONS 0
     117             :   #undef CYTHON_USE_EXC_INFO_STACK
     118             :   #define CYTHON_USE_EXC_INFO_STACK 0
     119             :   #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
     120             :     #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
     121             :   #endif
     122             :   #undef CYTHON_USE_FREELISTS
     123             :   #define CYTHON_USE_FREELISTS 0
     124             : #elif defined(PYPY_VERSION)
     125             :   #define CYTHON_COMPILING_IN_PYPY 1
     126             :   #define CYTHON_COMPILING_IN_CPYTHON 0
     127             :   #define CYTHON_COMPILING_IN_LIMITED_API 0
     128             :   #define CYTHON_COMPILING_IN_GRAAL 0
     129             :   #define CYTHON_COMPILING_IN_NOGIL 0
     130             :   #undef CYTHON_USE_TYPE_SLOTS
     131             :   #define CYTHON_USE_TYPE_SLOTS 0
     132             :   #ifndef CYTHON_USE_TYPE_SPECS
     133             :     #define CYTHON_USE_TYPE_SPECS 0
     134             :   #endif
     135             :   #undef CYTHON_USE_PYTYPE_LOOKUP
     136             :   #define CYTHON_USE_PYTYPE_LOOKUP 0
     137             :   #if PY_VERSION_HEX < 0x03050000
     138             :     #undef CYTHON_USE_ASYNC_SLOTS
     139             :     #define CYTHON_USE_ASYNC_SLOTS 0
     140             :   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
     141             :     #define CYTHON_USE_ASYNC_SLOTS 1
     142             :   #endif
     143             :   #undef CYTHON_USE_PYLIST_INTERNALS
     144             :   #define CYTHON_USE_PYLIST_INTERNALS 0
     145             :   #undef CYTHON_USE_UNICODE_INTERNALS
     146             :   #define CYTHON_USE_UNICODE_INTERNALS 0
     147             :   #undef CYTHON_USE_UNICODE_WRITER
     148             :   #define CYTHON_USE_UNICODE_WRITER 0
     149             :   #undef CYTHON_USE_PYLONG_INTERNALS
     150             :   #define CYTHON_USE_PYLONG_INTERNALS 0
     151             :   #undef CYTHON_AVOID_BORROWED_REFS
     152             :   #define CYTHON_AVOID_BORROWED_REFS 1
     153             :   #undef CYTHON_ASSUME_SAFE_MACROS
     154             :   #define CYTHON_ASSUME_SAFE_MACROS 0
     155             :   #undef CYTHON_UNPACK_METHODS
     156             :   #define CYTHON_UNPACK_METHODS 0
     157             :   #undef CYTHON_FAST_THREAD_STATE
     158             :   #define CYTHON_FAST_THREAD_STATE 0
     159             :   #undef CYTHON_FAST_GIL
     160             :   #define CYTHON_FAST_GIL 0
     161             :   #undef CYTHON_METH_FASTCALL
     162             :   #define CYTHON_METH_FASTCALL 0
     163             :   #undef CYTHON_FAST_PYCALL
     164             :   #define CYTHON_FAST_PYCALL 0
     165             :   #ifndef CYTHON_PEP487_INIT_SUBCLASS
     166             :     #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
     167             :   #endif
     168             :   #if PY_VERSION_HEX < 0x03090000
     169             :     #undef CYTHON_PEP489_MULTI_PHASE_INIT
     170             :     #define CYTHON_PEP489_MULTI_PHASE_INIT 0
     171             :   #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
     172             :     #define CYTHON_PEP489_MULTI_PHASE_INIT 1
     173             :   #endif
     174             :   #undef CYTHON_USE_MODULE_STATE
     175             :   #define CYTHON_USE_MODULE_STATE 0
     176             :   #undef CYTHON_USE_TP_FINALIZE
     177             :   #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
     178             :   #undef CYTHON_USE_DICT_VERSIONS
     179             :   #define CYTHON_USE_DICT_VERSIONS 0
     180             :   #undef CYTHON_USE_EXC_INFO_STACK
     181             :   #define CYTHON_USE_EXC_INFO_STACK 0
     182             :   #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
     183             :     #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
     184             :   #endif
     185             :   #undef CYTHON_USE_FREELISTS
     186             :   #define CYTHON_USE_FREELISTS 0
     187             : #elif defined(CYTHON_LIMITED_API)
     188             :   #ifdef Py_LIMITED_API
     189             :     #undef __PYX_LIMITED_VERSION_HEX
     190             :     #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
     191             :   #endif
     192             :   #define CYTHON_COMPILING_IN_PYPY 0
     193             :   #define CYTHON_COMPILING_IN_CPYTHON 0
     194             :   #define CYTHON_COMPILING_IN_LIMITED_API 1
     195             :   #define CYTHON_COMPILING_IN_GRAAL 0
     196             :   #define CYTHON_COMPILING_IN_NOGIL 0
     197             :   #undef CYTHON_CLINE_IN_TRACEBACK
     198             :   #define CYTHON_CLINE_IN_TRACEBACK 0
     199             :   #undef CYTHON_USE_TYPE_SLOTS
     200             :   #define CYTHON_USE_TYPE_SLOTS 0
     201             :   #undef CYTHON_USE_TYPE_SPECS
     202             :   #define CYTHON_USE_TYPE_SPECS 1
     203             :   #undef CYTHON_USE_PYTYPE_LOOKUP
     204             :   #define CYTHON_USE_PYTYPE_LOOKUP 0
     205             :   #undef CYTHON_USE_ASYNC_SLOTS
     206             :   #define CYTHON_USE_ASYNC_SLOTS 0
     207             :   #undef CYTHON_USE_PYLIST_INTERNALS
     208             :   #define CYTHON_USE_PYLIST_INTERNALS 0
     209             :   #undef CYTHON_USE_UNICODE_INTERNALS
     210             :   #define CYTHON_USE_UNICODE_INTERNALS 0
     211             :   #ifndef CYTHON_USE_UNICODE_WRITER
     212             :     #define CYTHON_USE_UNICODE_WRITER 0
     213             :   #endif
     214             :   #undef CYTHON_USE_PYLONG_INTERNALS
     215             :   #define CYTHON_USE_PYLONG_INTERNALS 0
     216             :   #ifndef CYTHON_AVOID_BORROWED_REFS
     217             :     #define CYTHON_AVOID_BORROWED_REFS 0
     218             :   #endif
     219             :   #undef CYTHON_ASSUME_SAFE_MACROS
     220             :   #define CYTHON_ASSUME_SAFE_MACROS 0
     221             :   #undef CYTHON_UNPACK_METHODS
     222             :   #define CYTHON_UNPACK_METHODS 0
     223             :   #undef CYTHON_FAST_THREAD_STATE
     224             :   #define CYTHON_FAST_THREAD_STATE 0
     225             :   #undef CYTHON_FAST_GIL
     226             :   #define CYTHON_FAST_GIL 0
     227             :   #undef CYTHON_METH_FASTCALL
     228             :   #define CYTHON_METH_FASTCALL 0
     229             :   #undef CYTHON_FAST_PYCALL
     230             :   #define CYTHON_FAST_PYCALL 0
     231             :   #ifndef CYTHON_PEP487_INIT_SUBCLASS
     232             :     #define CYTHON_PEP487_INIT_SUBCLASS 1
     233             :   #endif
     234             :   #undef CYTHON_PEP489_MULTI_PHASE_INIT
     235             :   #define CYTHON_PEP489_MULTI_PHASE_INIT 0
     236             :   #undef CYTHON_USE_MODULE_STATE
     237             :   #define CYTHON_USE_MODULE_STATE 1
     238             :   #ifndef CYTHON_USE_TP_FINALIZE
     239             :     #define CYTHON_USE_TP_FINALIZE 0
     240             :   #endif
     241             :   #undef CYTHON_USE_DICT_VERSIONS
     242             :   #define CYTHON_USE_DICT_VERSIONS 0
     243             :   #undef CYTHON_USE_EXC_INFO_STACK
     244             :   #define CYTHON_USE_EXC_INFO_STACK 0
     245             :   #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
     246             :     #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
     247             :   #endif
     248             :   #undef CYTHON_USE_FREELISTS
     249             :   #define CYTHON_USE_FREELISTS 0
     250             : #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL)
     251             :   #define CYTHON_COMPILING_IN_PYPY 0
     252             :   #define CYTHON_COMPILING_IN_CPYTHON 0
     253             :   #define CYTHON_COMPILING_IN_LIMITED_API 0
     254             :   #define CYTHON_COMPILING_IN_GRAAL 0
     255             :   #define CYTHON_COMPILING_IN_NOGIL 1
     256             :   #ifndef CYTHON_USE_TYPE_SLOTS
     257             :     #define CYTHON_USE_TYPE_SLOTS 1
     258             :   #endif
     259             :   #ifndef CYTHON_USE_TYPE_SPECS
     260             :     #define CYTHON_USE_TYPE_SPECS 0
     261             :   #endif
     262             :   #undef CYTHON_USE_PYTYPE_LOOKUP
     263             :   #define CYTHON_USE_PYTYPE_LOOKUP 0
     264             :   #ifndef CYTHON_USE_ASYNC_SLOTS
     265             :     #define CYTHON_USE_ASYNC_SLOTS 1
     266             :   #endif
     267             :   #ifndef CYTHON_USE_PYLONG_INTERNALS
     268             :     #define CYTHON_USE_PYLONG_INTERNALS 0
     269             :   #endif
     270             :   #undef CYTHON_USE_PYLIST_INTERNALS
     271             :   #define CYTHON_USE_PYLIST_INTERNALS 0
     272             :   #ifndef CYTHON_USE_UNICODE_INTERNALS
     273             :     #define CYTHON_USE_UNICODE_INTERNALS 1
     274             :   #endif
     275             :   #undef CYTHON_USE_UNICODE_WRITER
     276             :   #define CYTHON_USE_UNICODE_WRITER 0
     277             :   #ifndef CYTHON_AVOID_BORROWED_REFS
     278             :     #define CYTHON_AVOID_BORROWED_REFS 0
     279             :   #endif
     280             :   #ifndef CYTHON_ASSUME_SAFE_MACROS
     281             :     #define CYTHON_ASSUME_SAFE_MACROS 1
     282             :   #endif
     283             :   #ifndef CYTHON_UNPACK_METHODS
     284             :     #define CYTHON_UNPACK_METHODS 1
     285             :   #endif
     286             :   #undef CYTHON_FAST_THREAD_STATE
     287             :   #define CYTHON_FAST_THREAD_STATE 0
     288             :   #undef CYTHON_FAST_GIL
     289             :   #define CYTHON_FAST_GIL 0
     290             :   #ifndef CYTHON_METH_FASTCALL
     291             :     #define CYTHON_METH_FASTCALL 1
     292             :   #endif
     293             :   #undef CYTHON_FAST_PYCALL
     294             :   #define CYTHON_FAST_PYCALL 0
     295             :   #ifndef CYTHON_PEP487_INIT_SUBCLASS
     296             :     #define CYTHON_PEP487_INIT_SUBCLASS 1
     297             :   #endif
     298             :   #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
     299             :     #define CYTHON_PEP489_MULTI_PHASE_INIT 1
     300             :   #endif
     301             :   #ifndef CYTHON_USE_MODULE_STATE
     302             :     #define CYTHON_USE_MODULE_STATE 0
     303             :   #endif
     304             :   #ifndef CYTHON_USE_TP_FINALIZE
     305             :     #define CYTHON_USE_TP_FINALIZE 1
     306             :   #endif
     307             :   #undef CYTHON_USE_DICT_VERSIONS
     308             :   #define CYTHON_USE_DICT_VERSIONS 0
     309             :   #undef CYTHON_USE_EXC_INFO_STACK
     310             :   #define CYTHON_USE_EXC_INFO_STACK 0
     311             :   #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
     312             :     #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
     313             :   #endif
     314             :   #ifndef CYTHON_USE_FREELISTS
     315             :     #define CYTHON_USE_FREELISTS 0
     316             :   #endif
     317             : #else
     318             :   #define CYTHON_COMPILING_IN_PYPY 0
     319             :   #define CYTHON_COMPILING_IN_CPYTHON 1
     320             :   #define CYTHON_COMPILING_IN_LIMITED_API 0
     321             :   #define CYTHON_COMPILING_IN_GRAAL 0
     322             :   #define CYTHON_COMPILING_IN_NOGIL 0
     323             :   #ifndef CYTHON_USE_TYPE_SLOTS
     324             :     #define CYTHON_USE_TYPE_SLOTS 1
     325             :   #endif
     326             :   #ifndef CYTHON_USE_TYPE_SPECS
     327             :     #define CYTHON_USE_TYPE_SPECS 0
     328             :   #endif
     329             :   #ifndef CYTHON_USE_PYTYPE_LOOKUP
     330             :     #define CYTHON_USE_PYTYPE_LOOKUP 1
     331             :   #endif
     332             :   #if PY_MAJOR_VERSION < 3
     333             :     #undef CYTHON_USE_ASYNC_SLOTS
     334             :     #define CYTHON_USE_ASYNC_SLOTS 0
     335             :   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
     336             :     #define CYTHON_USE_ASYNC_SLOTS 1
     337             :   #endif
     338             :   #ifndef CYTHON_USE_PYLONG_INTERNALS
     339             :     #define CYTHON_USE_PYLONG_INTERNALS 1
     340             :   #endif
     341             :   #ifndef CYTHON_USE_PYLIST_INTERNALS
     342             :     #define CYTHON_USE_PYLIST_INTERNALS 1
     343             :   #endif
     344             :   #ifndef CYTHON_USE_UNICODE_INTERNALS
     345             :     #define CYTHON_USE_UNICODE_INTERNALS 1
     346             :   #endif
     347             :   #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
     348             :     #undef CYTHON_USE_UNICODE_WRITER
     349             :     #define CYTHON_USE_UNICODE_WRITER 0
     350             :   #elif !defined(CYTHON_USE_UNICODE_WRITER)
     351             :     #define CYTHON_USE_UNICODE_WRITER 1
     352             :   #endif
     353             :   #ifndef CYTHON_AVOID_BORROWED_REFS
     354             :     #define CYTHON_AVOID_BORROWED_REFS 0
     355             :   #endif
     356             :   #ifndef CYTHON_ASSUME_SAFE_MACROS
     357             :     #define CYTHON_ASSUME_SAFE_MACROS 1
     358             :   #endif
     359             :   #ifndef CYTHON_UNPACK_METHODS
     360             :     #define CYTHON_UNPACK_METHODS 1
     361             :   #endif
     362             :   #ifndef CYTHON_FAST_THREAD_STATE
     363             :     #define CYTHON_FAST_THREAD_STATE 1
     364             :   #endif
     365             :   #ifndef CYTHON_FAST_GIL
     366             :     #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6)
     367             :   #endif
     368             :   #ifndef CYTHON_METH_FASTCALL
     369             :     #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
     370             :   #endif
     371             :   #ifndef CYTHON_FAST_PYCALL
     372             :     #define CYTHON_FAST_PYCALL 1
     373             :   #endif
     374             :   #ifndef CYTHON_PEP487_INIT_SUBCLASS
     375             :     #define CYTHON_PEP487_INIT_SUBCLASS 1
     376             :   #endif
     377             :   #if PY_VERSION_HEX < 0x03050000
     378             :     #undef CYTHON_PEP489_MULTI_PHASE_INIT
     379             :     #define CYTHON_PEP489_MULTI_PHASE_INIT 0
     380             :   #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
     381             :     #define CYTHON_PEP489_MULTI_PHASE_INIT 1
     382             :   #endif
     383             :   #ifndef CYTHON_USE_MODULE_STATE
     384             :     #define CYTHON_USE_MODULE_STATE 0
     385             :   #endif
     386             :   #if PY_VERSION_HEX < 0x030400a1
     387             :     #undef CYTHON_USE_TP_FINALIZE
     388             :     #define CYTHON_USE_TP_FINALIZE 0
     389             :   #elif !defined(CYTHON_USE_TP_FINALIZE)
     390             :     #define CYTHON_USE_TP_FINALIZE 1
     391             :   #endif
     392             :   #if PY_VERSION_HEX < 0x030600B1
     393             :     #undef CYTHON_USE_DICT_VERSIONS
     394             :     #define CYTHON_USE_DICT_VERSIONS 0
     395             :   #elif !defined(CYTHON_USE_DICT_VERSIONS)
     396             :     #define CYTHON_USE_DICT_VERSIONS  (PY_VERSION_HEX < 0x030C00A5)
     397             :   #endif
     398             :   #if PY_VERSION_HEX < 0x030700A3
     399             :     #undef CYTHON_USE_EXC_INFO_STACK
     400             :     #define CYTHON_USE_EXC_INFO_STACK 0
     401             :   #elif !defined(CYTHON_USE_EXC_INFO_STACK)
     402             :     #define CYTHON_USE_EXC_INFO_STACK 1
     403             :   #endif
     404             :   #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
     405             :     #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
     406             :   #endif
     407             :   #ifndef CYTHON_USE_FREELISTS
     408             :     #define CYTHON_USE_FREELISTS 1
     409             :   #endif
     410             : #endif
     411             : #if !defined(CYTHON_FAST_PYCCALL)
     412             : #define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
     413             : #endif
     414             : #if !defined(CYTHON_VECTORCALL)
     415             : #define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
     416             : #endif
     417             : #define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
     418             : #if CYTHON_USE_PYLONG_INTERNALS
     419             :   #if PY_MAJOR_VERSION < 3
     420             :     #include "longintrepr.h"
     421             :   #endif
     422             :   #undef SHIFT
     423             :   #undef BASE
     424             :   #undef MASK
     425             :   #ifdef SIZEOF_VOID_P
     426             :     enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
     427             :   #endif
     428             : #endif
     429             : #ifndef __has_attribute
     430             :   #define __has_attribute(x) 0
     431             : #endif
     432             : #ifndef __has_cpp_attribute
     433             :   #define __has_cpp_attribute(x) 0
     434             : #endif
     435             : #ifndef CYTHON_RESTRICT
     436             :   #if defined(__GNUC__)
     437             :     #define CYTHON_RESTRICT __restrict__
     438             :   #elif defined(_MSC_VER) && _MSC_VER >= 1400
     439             :     #define CYTHON_RESTRICT __restrict
     440             :   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
     441             :     #define CYTHON_RESTRICT restrict
     442             :   #else
     443             :     #define CYTHON_RESTRICT
     444             :   #endif
     445             : #endif
     446             : #ifndef CYTHON_UNUSED
     447             :   #if defined(__cplusplus)
     448             :     /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
     449             :      * but leads to warnings with -pedantic, since it is a C++17 feature */
     450             :     #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
     451             :       #if __has_cpp_attribute(maybe_unused)
     452             :         #define CYTHON_UNUSED [[maybe_unused]]
     453             :       #endif
     454             :     #endif
     455             :   #endif
     456             : #endif
     457             : #ifndef CYTHON_UNUSED
     458             : # if defined(__GNUC__)
     459             : #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
     460             : #     define CYTHON_UNUSED __attribute__ ((__unused__))
     461             : #   else
     462             : #     define CYTHON_UNUSED
     463             : #   endif
     464             : # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
     465             : #   define CYTHON_UNUSED __attribute__ ((__unused__))
     466             : # else
     467             : #   define CYTHON_UNUSED
     468             : # endif
     469             : #endif
     470             : #ifndef CYTHON_UNUSED_VAR
     471             : #  if defined(__cplusplus)
     472             :      template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
     473             : #  else
     474             : #    define CYTHON_UNUSED_VAR(x) (void)(x)
     475             : #  endif
     476             : #endif
     477             : #ifndef CYTHON_MAYBE_UNUSED_VAR
     478             :   #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
     479             : #endif
     480             : #ifndef CYTHON_NCP_UNUSED
     481             : # if CYTHON_COMPILING_IN_CPYTHON
     482             : #  define CYTHON_NCP_UNUSED
     483             : # else
     484             : #  define CYTHON_NCP_UNUSED CYTHON_UNUSED
     485             : # endif
     486             : #endif
     487             : #ifndef CYTHON_USE_CPP_STD_MOVE
     488             :   #if defined(__cplusplus) && (\
     489             :     __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
     490             :     #define CYTHON_USE_CPP_STD_MOVE 1
     491             :   #else
     492             :     #define CYTHON_USE_CPP_STD_MOVE 0
     493             :   #endif
     494             : #endif
     495             : #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
     496             : #ifdef _MSC_VER
     497             :     #ifndef _MSC_STDINT_H_
     498             :         #if _MSC_VER < 1300
     499             :             typedef unsigned char     uint8_t;
     500             :             typedef unsigned short    uint16_t;
     501             :             typedef unsigned int      uint32_t;
     502             :         #else
     503             :             typedef unsigned __int8   uint8_t;
     504             :             typedef unsigned __int16  uint16_t;
     505             :             typedef unsigned __int32  uint32_t;
     506             :         #endif
     507             :     #endif
     508             :     #if _MSC_VER < 1300
     509             :         #ifdef _WIN64
     510             :             typedef unsigned long long  __pyx_uintptr_t;
     511             :         #else
     512             :             typedef unsigned int        __pyx_uintptr_t;
     513             :         #endif
     514             :     #else
     515             :         #ifdef _WIN64
     516             :             typedef unsigned __int64    __pyx_uintptr_t;
     517             :         #else
     518             :             typedef unsigned __int32    __pyx_uintptr_t;
     519             :         #endif
     520             :     #endif
     521             : #else
     522             :     #include <stdint.h>
     523             :     typedef uintptr_t  __pyx_uintptr_t;
     524             : #endif
     525             : #ifndef CYTHON_FALLTHROUGH
     526             :   #if defined(__cplusplus)
     527             :     /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
     528             :      * but leads to warnings with -pedantic, since it is a C++17 feature */
     529             :     #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
     530             :       #if __has_cpp_attribute(fallthrough)
     531             :         #define CYTHON_FALLTHROUGH [[fallthrough]]
     532             :       #endif
     533             :     #endif
     534             :     #ifndef CYTHON_FALLTHROUGH
     535             :       #if __has_cpp_attribute(clang::fallthrough)
     536             :         #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
     537             :       #elif __has_cpp_attribute(gnu::fallthrough)
     538             :         #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
     539             :       #endif
     540             :     #endif
     541             :   #endif
     542             :   #ifndef CYTHON_FALLTHROUGH
     543             :     #if __has_attribute(fallthrough)
     544             :       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
     545             :     #else
     546             :       #define CYTHON_FALLTHROUGH
     547             :     #endif
     548             :   #endif
     549             :   #if defined(__clang__) && defined(__apple_build_version__)
     550             :     #if __apple_build_version__ < 7000000
     551             :       #undef  CYTHON_FALLTHROUGH
     552             :       #define CYTHON_FALLTHROUGH
     553             :     #endif
     554             :   #endif
     555             : #endif
     556             : #ifdef __cplusplus
     557             :   template <typename T>
     558             :   struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
     559             :   #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
     560             : #else
     561             :   #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
     562             : #endif
     563             : #if CYTHON_COMPILING_IN_PYPY == 1
     564             :   #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000)
     565             : #else
     566             :   #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000)
     567             : #endif
     568             : #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))
     569             : 
     570             : #ifndef CYTHON_INLINE
     571             :   #if defined(__clang__)
     572             :     #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
     573             :   #elif defined(__GNUC__)
     574             :     #define CYTHON_INLINE __inline__
     575             :   #elif defined(_MSC_VER)
     576             :     #define CYTHON_INLINE __inline
     577             :   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
     578             :     #define CYTHON_INLINE inline
     579             :   #else
     580             :     #define CYTHON_INLINE
     581             :   #endif
     582             : #endif
     583             : 
     584             : #define __PYX_BUILD_PY_SSIZE_T "n"
     585             : #define CYTHON_FORMAT_SSIZE_T "z"
     586             : #if PY_MAJOR_VERSION < 3
     587             :   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
     588             :   #define __Pyx_DefaultClassType PyClass_Type
     589             :   #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
     590             :           PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
     591             : #else
     592             :   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
     593             :   #define __Pyx_DefaultClassType PyType_Type
     594             : #if CYTHON_COMPILING_IN_LIMITED_API
     595             :     static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
     596             :                                                     PyObject *code, PyObject *c, PyObject* n, PyObject *v,
     597             :                                                     PyObject *fv, PyObject *cell, PyObject* fn,
     598             :                                                     PyObject *name, int fline, PyObject *lnos) {
     599             :         PyObject *exception_table = NULL;
     600             :         PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
     601             :         #if __PYX_LIMITED_VERSION_HEX < 0x030B0000
     602             :         PyObject *version_info;
     603             :         PyObject *py_minor_version = NULL;
     604             :         #endif
     605             :         long minor_version = 0;
     606             :         PyObject *type, *value, *traceback;
     607             :         PyErr_Fetch(&type, &value, &traceback);
     608             :         #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000
     609             :         minor_version = 11;
     610             :         #else
     611             :         if (!(version_info = PySys_GetObject("version_info"))) goto end;
     612             :         if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
     613             :         minor_version = PyLong_AsLong(py_minor_version);
     614             :         Py_DECREF(py_minor_version);
     615             :         if (minor_version == -1 && PyErr_Occurred()) goto end;
     616             :         #endif
     617             :         if (!(types_module = PyImport_ImportModule("types"))) goto end;
     618             :         if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
     619             :         if (minor_version <= 7) {
     620             :             (void)p;
     621             :             result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code,
     622             :                           c, n, v, fn, name, fline, lnos, fv, cell);
     623             :         } else if (minor_version <= 10) {
     624             :             result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code,
     625             :                           c, n, v, fn, name, fline, lnos, fv, cell);
     626             :         } else {
     627             :             if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
     628             :             result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code,
     629             :                           c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
     630             :         }
     631             :     end:
     632             :         Py_XDECREF(code_type);
     633             :         Py_XDECREF(exception_table);
     634             :         Py_XDECREF(types_module);
     635             :         if (type) {
     636             :             PyErr_Restore(type, value, traceback);
     637             :         }
     638             :         return result;
     639             :     }
     640             :     #ifndef CO_OPTIMIZED
     641             :     #define CO_OPTIMIZED 0x0001
     642             :     #endif
     643             :     #ifndef CO_NEWLOCALS
     644             :     #define CO_NEWLOCALS 0x0002
     645             :     #endif
     646             :     #ifndef CO_VARARGS
     647             :     #define CO_VARARGS 0x0004
     648             :     #endif
     649             :     #ifndef CO_VARKEYWORDS
     650             :     #define CO_VARKEYWORDS 0x0008
     651             :     #endif
     652             :     #ifndef CO_ASYNC_GENERATOR
     653             :     #define CO_ASYNC_GENERATOR 0x0200
     654             :     #endif
     655             :     #ifndef CO_GENERATOR
     656             :     #define CO_GENERATOR 0x0020
     657             :     #endif
     658             :     #ifndef CO_COROUTINE
     659             :     #define CO_COROUTINE 0x0080
     660             :     #endif
     661             : #elif PY_VERSION_HEX >= 0x030B0000
     662           9 :   static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
     663             :                                                     PyObject *code, PyObject *c, PyObject* n, PyObject *v,
     664             :                                                     PyObject *fv, PyObject *cell, PyObject* fn,
     665             :                                                     PyObject *name, int fline, PyObject *lnos) {
     666           9 :     PyCodeObject *result;
     667           9 :     PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0);
     668           9 :     if (!empty_bytes) return NULL;
     669           9 :     result =
     670             :       #if PY_VERSION_HEX >= 0x030C0000
     671           9 :         PyUnstable_Code_NewWithPosOnlyArgs
     672             :       #else
     673             :         PyCode_NewWithPosOnlyArgs
     674             :       #endif
     675             :         (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes);
     676           9 :     Py_DECREF(empty_bytes);
     677             :     return result;
     678             :   }
     679             : #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
     680             :   #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
     681             :           PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
     682             : #else
     683             :   #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
     684             :           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
     685             : #endif
     686             : #endif
     687             : #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
     688             :   #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
     689             : #else
     690             :   #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
     691             : #endif
     692             : #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
     693             :   #define __Pyx_Py_Is(x, y)  Py_Is(x, y)
     694             : #else
     695             :   #define __Pyx_Py_Is(x, y) ((x) == (y))
     696             : #endif
     697             : #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
     698             :   #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
     699             : #else
     700             :   #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
     701             : #endif
     702             : #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
     703             :   #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
     704             : #else
     705             :   #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
     706             : #endif
     707             : #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
     708             :   #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
     709             : #else
     710             :   #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
     711             : #endif
     712             : #define __Pyx_NoneAsNull(obj)  (__Pyx_Py_IsNone(obj) ? NULL : (obj))
     713             : #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
     714             :   #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
     715             : #else
     716             :   #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
     717             : #endif
     718             : #ifndef CO_COROUTINE
     719             :   #define CO_COROUTINE 0x80
     720             : #endif
     721             : #ifndef CO_ASYNC_GENERATOR
     722             :   #define CO_ASYNC_GENERATOR 0x200
     723             : #endif
     724             : #ifndef Py_TPFLAGS_CHECKTYPES
     725             :   #define Py_TPFLAGS_CHECKTYPES 0
     726             : #endif
     727             : #ifndef Py_TPFLAGS_HAVE_INDEX
     728             :   #define Py_TPFLAGS_HAVE_INDEX 0
     729             : #endif
     730             : #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
     731             :   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
     732             : #endif
     733             : #ifndef Py_TPFLAGS_HAVE_FINALIZE
     734             :   #define Py_TPFLAGS_HAVE_FINALIZE 0
     735             : #endif
     736             : #ifndef Py_TPFLAGS_SEQUENCE
     737             :   #define Py_TPFLAGS_SEQUENCE 0
     738             : #endif
     739             : #ifndef Py_TPFLAGS_MAPPING
     740             :   #define Py_TPFLAGS_MAPPING 0
     741             : #endif
     742             : #ifndef METH_STACKLESS
     743             :   #define METH_STACKLESS 0
     744             : #endif
     745             : #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
     746             :   #ifndef METH_FASTCALL
     747             :      #define METH_FASTCALL 0x80
     748             :   #endif
     749             :   typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
     750             :   typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
     751             :                                                           Py_ssize_t nargs, PyObject *kwnames);
     752             : #else
     753             :   #if PY_VERSION_HEX >= 0x030d00A4
     754             :   #  define __Pyx_PyCFunctionFast PyCFunctionFast
     755             :   #  define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
     756             :   #else
     757             :   #  define __Pyx_PyCFunctionFast _PyCFunctionFast
     758             :   #  define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
     759             :   #endif
     760             : #endif
     761             : #if CYTHON_METH_FASTCALL
     762             :   #define __Pyx_METH_FASTCALL METH_FASTCALL
     763             :   #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
     764             :   #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
     765             : #else
     766             :   #define __Pyx_METH_FASTCALL METH_VARARGS
     767             :   #define __Pyx_PyCFunction_FastCall PyCFunction
     768             :   #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
     769             : #endif
     770             : #if CYTHON_VECTORCALL
     771             :   #define __pyx_vectorcallfunc vectorcallfunc
     772             :   #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
     773             :   #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
     774             : #elif CYTHON_BACKPORT_VECTORCALL
     775             :   typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
     776             :                                             size_t nargsf, PyObject *kwnames);
     777             :   #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  ((size_t)1 << (8 * sizeof(size_t) - 1))
     778             :   #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
     779             : #else
     780             :   #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
     781             :   #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
     782             : #endif
     783             : #if PY_MAJOR_VERSION >= 0x030900B1
     784             : #define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_CheckExact(func)
     785             : #else
     786             : #define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_Check(func)
     787             : #endif
     788             : #define __Pyx_CyOrPyCFunction_Check(func)  PyCFunction_Check(func)
     789             : #if CYTHON_COMPILING_IN_CPYTHON
     790             : #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  (((PyCFunctionObject*)(func))->m_ml->ml_meth)
     791             : #elif !CYTHON_COMPILING_IN_LIMITED_API
     792             : #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  PyCFunction_GET_FUNCTION(func)
     793             : #endif
     794             : #if CYTHON_COMPILING_IN_CPYTHON
     795             : #define __Pyx_CyOrPyCFunction_GET_FLAGS(func)  (((PyCFunctionObject*)(func))->m_ml->ml_flags)
     796           0 : static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
     797           0 :     return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
     798             : }
     799             : #endif
     800             : static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) {
     801             : #if CYTHON_COMPILING_IN_LIMITED_API
     802             :     return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
     803             : #else
     804             :     return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
     805             : #endif
     806             : }
     807             : #define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCFunction(func, cfunc)
     808             : #if __PYX_LIMITED_VERSION_HEX < 0x030900B1
     809             :   #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  ((void)m, PyType_FromSpecWithBases(s, b))
     810             :   typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
     811             : #else
     812             :   #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  PyType_FromModuleAndSpec(m, s, b)
     813             :   #define __Pyx_PyCMethod  PyCMethod
     814             : #endif
     815             : #ifndef METH_METHOD
     816             :   #define METH_METHOD 0x200
     817             : #endif
     818             : #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
     819             :   #define PyObject_Malloc(s)   PyMem_Malloc(s)
     820             :   #define PyObject_Free(p)     PyMem_Free(p)
     821             :   #define PyObject_Realloc(p)  PyMem_Realloc(p)
     822             : #endif
     823             : #if CYTHON_COMPILING_IN_LIMITED_API
     824             :   #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
     825             :   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
     826             : #else
     827             :   #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
     828             :   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
     829             : #endif
     830             : #if CYTHON_COMPILING_IN_LIMITED_API
     831             :   #define __Pyx_PyThreadState_Current PyThreadState_Get()
     832             : #elif !CYTHON_FAST_THREAD_STATE
     833             :   #define __Pyx_PyThreadState_Current PyThreadState_GET()
     834             : #elif PY_VERSION_HEX >= 0x030d00A1
     835             :   #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
     836             : #elif PY_VERSION_HEX >= 0x03060000
     837             :   #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
     838             : #elif PY_VERSION_HEX >= 0x03000000
     839             :   #define __Pyx_PyThreadState_Current PyThreadState_GET()
     840             : #else
     841             :   #define __Pyx_PyThreadState_Current _PyThreadState_Current
     842             : #endif
     843             : #if CYTHON_COMPILING_IN_LIMITED_API
     844             : static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op)
     845             : {
     846             :     void *result;
     847             :     result = PyModule_GetState(op);
     848             :     if (!result)
     849             :         Py_FatalError("Couldn't find the module state");
     850             :     return result;
     851             : }
     852             : #endif
     853             : #define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype)
     854             : #if CYTHON_COMPILING_IN_LIMITED_API
     855             :   #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
     856             : #else
     857             :   #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
     858             : #endif
     859             : #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
     860             : #include "pythread.h"
     861             : #define Py_tss_NEEDS_INIT 0
     862             : typedef int Py_tss_t;
     863             : static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
     864             :   *key = PyThread_create_key();
     865             :   return 0;
     866             : }
     867             : static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
     868             :   Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
     869             :   *key = Py_tss_NEEDS_INIT;
     870             :   return key;
     871             : }
     872             : static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
     873             :   PyObject_Free(key);
     874             : }
     875             : static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
     876             :   return *key != Py_tss_NEEDS_INIT;
     877             : }
     878             : static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
     879             :   PyThread_delete_key(*key);
     880             :   *key = Py_tss_NEEDS_INIT;
     881             : }
     882             : static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
     883             :   return PyThread_set_key_value(*key, value);
     884             : }
     885             : static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
     886             :   return PyThread_get_key_value(*key);
     887             : }
     888             : #endif
     889             : #if PY_MAJOR_VERSION < 3
     890             :     #if CYTHON_COMPILING_IN_PYPY
     891             :         #if PYPY_VERSION_NUM < 0x07030600
     892             :             #if defined(__cplusplus) && __cplusplus >= 201402L
     893             :                 [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
     894             :             #elif defined(__GNUC__) || defined(__clang__)
     895             :                 __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
     896             :             #elif defined(_MSC_VER)
     897             :                 __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
     898             :             #endif
     899             :             static CYTHON_INLINE int PyGILState_Check(void) {
     900             :                 return 0;
     901             :             }
     902             :         #else  // PYPY_VERSION_NUM < 0x07030600
     903             :         #endif  // PYPY_VERSION_NUM < 0x07030600
     904             :     #else
     905             :         static CYTHON_INLINE int PyGILState_Check(void) {
     906             :             PyThreadState * tstate = _PyThreadState_Current;
     907             :             return tstate && (tstate == PyGILState_GetThisThreadState());
     908             :         }
     909             :     #endif
     910             : #endif
     911             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized)
     912             : #define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
     913             : #else
     914             : #define __Pyx_PyDict_NewPresized(n)  PyDict_New()
     915             : #endif
     916             : #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
     917             :   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
     918             :   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
     919             : #else
     920             :   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
     921             :   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
     922             : #endif
     923             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS
     924             : #define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
     925          44 : static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
     926          44 :     PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
     927          44 :     if (res == NULL) PyErr_Clear();
     928          44 :     return res;
     929             : }
     930             : #elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
     931             : #define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
     932             : #define __Pyx_PyDict_GetItemStr           PyDict_GetItem
     933             : #else
     934             : static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
     935             : #if CYTHON_COMPILING_IN_PYPY
     936             :     return PyDict_GetItem(dict, name);
     937             : #else
     938             :     PyDictEntry *ep;
     939             :     PyDictObject *mp = (PyDictObject*) dict;
     940             :     long hash = ((PyStringObject *) name)->ob_shash;
     941             :     assert(hash != -1);
     942             :     ep = (mp->ma_lookup)(mp, name, hash);
     943             :     if (ep == NULL) {
     944             :         return NULL;
     945             :     }
     946             :     return ep->me_value;
     947             : #endif
     948             : }
     949             : #define __Pyx_PyDict_GetItemStr           PyDict_GetItem
     950             : #endif
     951             : #if CYTHON_USE_TYPE_SLOTS
     952             :   #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
     953             :   #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
     954             :   #define __Pyx_PyObject_GetIterNextFunc(obj)  (Py_TYPE(obj)->tp_iternext)
     955             : #else
     956             :   #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
     957             :   #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
     958             :   #define __Pyx_PyObject_GetIterNextFunc(obj)  PyIter_Next
     959             : #endif
     960             : #if CYTHON_COMPILING_IN_LIMITED_API
     961             :   #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v)
     962             : #else
     963             :   #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v)
     964             : #endif
     965             : #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
     966             : #define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
     967             :     PyTypeObject *type = Py_TYPE((PyObject*)obj);\
     968             :     assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
     969             :     PyObject_GC_Del(obj);\
     970             :     Py_DECREF(type);\
     971             : }
     972             : #else
     973             : #define __Pyx_PyHeapTypeObject_GC_Del(obj)  PyObject_GC_Del(obj)
     974             : #endif
     975             : #if CYTHON_COMPILING_IN_LIMITED_API
     976             :   #define CYTHON_PEP393_ENABLED 1
     977             :   #define __Pyx_PyUnicode_READY(op)       (0)
     978             :   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GetLength(u)
     979             :   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
     980             :   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111U)
     981             :   #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
     982             :   #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
     983             :   #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
     984             :   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
     985             : #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
     986             :   #define CYTHON_PEP393_ENABLED 1
     987             :   #if PY_VERSION_HEX >= 0x030C0000
     988             :     #define __Pyx_PyUnicode_READY(op)       (0)
     989             :   #else
     990             :     #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
     991             :                                                 0 : _PyUnicode_Ready((PyObject *)(op)))
     992             :   #endif
     993             :   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
     994             :   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
     995             :   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
     996             :   #define __Pyx_PyUnicode_KIND(u)         ((int)PyUnicode_KIND(u))
     997             :   #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
     998             :   #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
     999             :   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
    1000             :   #if PY_VERSION_HEX >= 0x030C0000
    1001             :     #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
    1002             :   #else
    1003             :     #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    1004             :     #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    1005             :     #else
    1006             :     #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    1007             :     #endif
    1008             :   #endif
    1009             : #else
    1010             :   #define CYTHON_PEP393_ENABLED 0
    1011             :   #define PyUnicode_1BYTE_KIND  1
    1012             :   #define PyUnicode_2BYTE_KIND  2
    1013             :   #define PyUnicode_4BYTE_KIND  4
    1014             :   #define __Pyx_PyUnicode_READY(op)       (0)
    1015             :   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
    1016             :   #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
    1017             :   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U)
    1018             :   #define __Pyx_PyUnicode_KIND(u)         ((int)sizeof(Py_UNICODE))
    1019             :   #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
    1020             :   #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
    1021             :   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch)
    1022             :   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
    1023             : #endif
    1024             : #if CYTHON_COMPILING_IN_PYPY
    1025             :   #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
    1026             :   #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
    1027             : #else
    1028             :   #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
    1029             :   #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
    1030             :       PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
    1031             : #endif
    1032             : #if CYTHON_COMPILING_IN_PYPY
    1033             :   #if !defined(PyUnicode_DecodeUnicodeEscape)
    1034             :     #define PyUnicode_DecodeUnicodeEscape(s, size, errors)  PyUnicode_Decode(s, size, "unicode_escape", errors)
    1035             :   #endif
    1036             :   #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500)
    1037             :     #undef PyUnicode_Contains
    1038             :     #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
    1039             :   #endif
    1040             :   #if !defined(PyByteArray_Check)
    1041             :     #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
    1042             :   #endif
    1043             :   #if !defined(PyObject_Format)
    1044             :     #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
    1045             :   #endif
    1046             : #endif
    1047             : #define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
    1048             : #define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
    1049             : #if PY_MAJOR_VERSION >= 3
    1050             :   #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
    1051             : #else
    1052             :   #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
    1053             : #endif
    1054             : #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
    1055             :   #define PyObject_ASCII(o)            PyObject_Repr(o)
    1056             : #endif
    1057             : #if PY_MAJOR_VERSION >= 3
    1058             :   #define PyBaseString_Type            PyUnicode_Type
    1059             :   #define PyStringObject               PyUnicodeObject
    1060             :   #define PyString_Type                PyUnicode_Type
    1061             :   #define PyString_Check               PyUnicode_Check
    1062             :   #define PyString_CheckExact          PyUnicode_CheckExact
    1063             : #ifndef PyObject_Unicode
    1064             :   #define PyObject_Unicode             PyObject_Str
    1065             : #endif
    1066             : #endif
    1067             : #if PY_MAJOR_VERSION >= 3
    1068             :   #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
    1069             :   #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
    1070             : #else
    1071             :   #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
    1072             :   #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
    1073             : #endif
    1074             : #if CYTHON_COMPILING_IN_CPYTHON
    1075             :   #define __Pyx_PySequence_ListKeepNew(obj)\
    1076             :     (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
    1077             : #else
    1078             :   #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
    1079             : #endif
    1080             : #ifndef PySet_CheckExact
    1081             :   #define PySet_CheckExact(obj)        __Pyx_IS_TYPE(obj, &PySet_Type)
    1082             : #endif
    1083             : #if PY_VERSION_HEX >= 0x030900A4
    1084             :   #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
    1085             :   #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
    1086             : #else
    1087             :   #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
    1088             :   #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
    1089             : #endif
    1090             : #if CYTHON_ASSUME_SAFE_MACROS
    1091             :   #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
    1092             :   #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
    1093             :   #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
    1094             :   #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
    1095             :   #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
    1096             :   #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
    1097             :   #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
    1098             :   #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
    1099             :   #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
    1100             : #else
    1101             :   #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
    1102             :   #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
    1103             :   #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
    1104             :   #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
    1105             :   #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
    1106             :   #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
    1107             :   #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
    1108             :   #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
    1109             :   #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
    1110             : #endif
    1111             : #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
    1112             :   #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
    1113             : #else
    1114           9 :   static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
    1115           9 :       PyObject *module = PyImport_AddModule(name);
    1116           9 :       Py_XINCREF(module);
    1117           9 :       return module;
    1118             :   }
    1119             : #endif
    1120             : #if PY_MAJOR_VERSION >= 3
    1121             :   #define PyIntObject                  PyLongObject
    1122             :   #define PyInt_Type                   PyLong_Type
    1123             :   #define PyInt_Check(op)              PyLong_Check(op)
    1124             :   #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
    1125             :   #define __Pyx_Py3Int_Check(op)       PyLong_Check(op)
    1126             :   #define __Pyx_Py3Int_CheckExact(op)  PyLong_CheckExact(op)
    1127             :   #define PyInt_FromString             PyLong_FromString
    1128             :   #define PyInt_FromUnicode            PyLong_FromUnicode
    1129             :   #define PyInt_FromLong               PyLong_FromLong
    1130             :   #define PyInt_FromSize_t             PyLong_FromSize_t
    1131             :   #define PyInt_FromSsize_t            PyLong_FromSsize_t
    1132             :   #define PyInt_AsLong                 PyLong_AsLong
    1133             :   #define PyInt_AS_LONG                PyLong_AS_LONG
    1134             :   #define PyInt_AsSsize_t              PyLong_AsSsize_t
    1135             :   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
    1136             :   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
    1137             :   #define PyNumber_Int                 PyNumber_Long
    1138             : #else
    1139             :   #define __Pyx_Py3Int_Check(op)       (PyLong_Check(op) || PyInt_Check(op))
    1140             :   #define __Pyx_Py3Int_CheckExact(op)  (PyLong_CheckExact(op) || PyInt_CheckExact(op))
    1141             : #endif
    1142             : #if PY_MAJOR_VERSION >= 3
    1143             :   #define PyBoolObject                 PyLongObject
    1144             : #endif
    1145             : #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
    1146             :   #ifndef PyUnicode_InternFromString
    1147             :     #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
    1148             :   #endif
    1149             : #endif
    1150             : #if PY_VERSION_HEX < 0x030200A4
    1151             :   typedef long Py_hash_t;
    1152             :   #define __Pyx_PyInt_FromHash_t PyInt_FromLong
    1153             :   #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
    1154             : #else
    1155             :   #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
    1156             :   #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
    1157             : #endif
    1158             : #if CYTHON_USE_ASYNC_SLOTS
    1159             :   #if PY_VERSION_HEX >= 0x030500B1
    1160             :     #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    1161             :     #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
    1162             :   #else
    1163             :     #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
    1164             :   #endif
    1165             : #else
    1166             :   #define __Pyx_PyType_AsAsync(obj) NULL
    1167             : #endif
    1168             : #ifndef __Pyx_PyAsyncMethodsStruct
    1169             :     typedef struct {
    1170             :         unaryfunc am_await;
    1171             :         unaryfunc am_aiter;
    1172             :         unaryfunc am_anext;
    1173             :     } __Pyx_PyAsyncMethodsStruct;
    1174             : #endif
    1175             : 
    1176             : #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
    1177             :   #if !defined(_USE_MATH_DEFINES)
    1178             :     #define _USE_MATH_DEFINES
    1179             :   #endif
    1180             : #endif
    1181             : #include <math.h>
    1182             : #ifdef NAN
    1183             : #define __PYX_NAN() ((float) NAN)
    1184             : #else
    1185             : static CYTHON_INLINE float __PYX_NAN() {
    1186             :   float value;
    1187             :   memset(&value, 0xFF, sizeof(value));
    1188             :   return value;
    1189             : }
    1190             : #endif
    1191             : #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
    1192             : #define __Pyx_truncl trunc
    1193             : #else
    1194             : #define __Pyx_truncl truncl
    1195             : #endif
    1196             : 
    1197             : #define __PYX_MARK_ERR_POS(f_index, lineno) \
    1198             :     { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__;  (void)__pyx_clineno; }
    1199             : #define __PYX_ERR(f_index, lineno, Ln_error) \
    1200             :     { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
    1201             : 
    1202             : #ifdef CYTHON_EXTERN_C
    1203             :     #undef __PYX_EXTERN_C
    1204             :     #define __PYX_EXTERN_C CYTHON_EXTERN_C
    1205             : #elif defined(__PYX_EXTERN_C)
    1206             :     #ifdef _MSC_VER
    1207             :     #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
    1208             :     #else
    1209             :     #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
    1210             :     #endif
    1211             : #else
    1212             :   #ifdef __cplusplus
    1213             :     #define __PYX_EXTERN_C extern "C"
    1214             :   #else
    1215             :     #define __PYX_EXTERN_C extern
    1216             :   #endif
    1217             : #endif
    1218             : 
    1219             : #define __PYX_HAVE__scipy__sparse__csgraph___matching
    1220             : #define __PYX_HAVE_API__scipy__sparse__csgraph___matching
    1221             : /* Early includes */
    1222             : #include <string.h>
    1223             : #include <stdio.h>
    1224             : 
    1225             :     /* Using NumPy API declarations from "numpy/__init__.cython-30.pxd" */
    1226             :     
    1227             : #include "numpy/arrayobject.h"
    1228             : #include "numpy/ndarrayobject.h"
    1229             : #include "numpy/ndarraytypes.h"
    1230             : #include "numpy/arrayscalars.h"
    1231             : #include "numpy/ufuncobject.h"
    1232             : #include <math.h>
    1233             : #include "pythread.h"
    1234             : #include <stdlib.h>
    1235             : #ifdef _OPENMP
    1236             : #include <omp.h>
    1237             : #endif /* _OPENMP */
    1238             : 
    1239             : #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
    1240             : #define CYTHON_WITHOUT_ASSERTIONS
    1241             : #endif
    1242             : 
    1243             : typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
    1244             :                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
    1245             : 
    1246             : #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
    1247             : #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
    1248             : #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
    1249             : #define __PYX_DEFAULT_STRING_ENCODING ""
    1250             : #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
    1251             : #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
    1252             : #define __Pyx_uchar_cast(c) ((unsigned char)c)
    1253             : #define __Pyx_long_cast(x) ((long)x)
    1254             : #define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    1255             :     (sizeof(type) < sizeof(Py_ssize_t))  ||\
    1256             :     (sizeof(type) > sizeof(Py_ssize_t) &&\
    1257             :           likely(v < (type)PY_SSIZE_T_MAX ||\
    1258             :                  v == (type)PY_SSIZE_T_MAX)  &&\
    1259             :           (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
    1260             :                                 v == (type)PY_SSIZE_T_MIN)))  ||\
    1261             :     (sizeof(type) == sizeof(Py_ssize_t) &&\
    1262             :           (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
    1263             :                                v == (type)PY_SSIZE_T_MAX)))  )
    1264           0 : static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    1265           0 :     return (size_t) i < (size_t) limit;
    1266             : }
    1267             : #if defined (__cplusplus) && __cplusplus >= 201103L
    1268             :     #include <cstdlib>
    1269             :     #define __Pyx_sst_abs(value) std::abs(value)
    1270             : #elif SIZEOF_INT >= SIZEOF_SIZE_T
    1271             :     #define __Pyx_sst_abs(value) abs(value)
    1272             : #elif SIZEOF_LONG >= SIZEOF_SIZE_T
    1273             :     #define __Pyx_sst_abs(value) labs(value)
    1274             : #elif defined (_MSC_VER)
    1275             :     #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
    1276             : #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    1277             :     #define __Pyx_sst_abs(value) llabs(value)
    1278             : #elif defined (__GNUC__)
    1279             :     #define __Pyx_sst_abs(value) __builtin_llabs(value)
    1280             : #else
    1281             :     #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
    1282             : #endif
    1283             : static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
    1284             : static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
    1285             : static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
    1286             : static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
    1287             : #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
    1288             : #define __Pyx_PyBytes_FromString        PyBytes_FromString
    1289             : #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
    1290             : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
    1291             : #if PY_MAJOR_VERSION < 3
    1292             :     #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    1293             :     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
    1294             : #else
    1295             :     #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    1296             :     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
    1297             : #endif
    1298             : #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
    1299             : #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
    1300             : #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
    1301             : #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
    1302             : #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
    1303             : #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
    1304             : #define __Pyx_PyObject_AsWritableString(s)    ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
    1305             : #define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
    1306             : #define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
    1307             : #define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
    1308             : #define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
    1309             : #define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
    1310             : #define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
    1311             : #define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
    1312             : #define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
    1313             : #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
    1314             : #define __Pyx_PyUnicode_FromOrdinal(o)       PyUnicode_FromOrdinal((int)o)
    1315             : #define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
    1316             : #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
    1317             : #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
    1318             : static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
    1319             : static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
    1320             : static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
    1321             : static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
    1322             : #define __Pyx_PySequence_Tuple(obj)\
    1323             :     (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
    1324             : static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
    1325             : static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
    1326             : static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
    1327             : #if CYTHON_ASSUME_SAFE_MACROS
    1328             : #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
    1329             : #else
    1330             : #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
    1331             : #endif
    1332             : #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
    1333             : #if PY_MAJOR_VERSION >= 3
    1334             : #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
    1335             : #else
    1336             : #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
    1337             : #endif
    1338             : #if CYTHON_USE_PYLONG_INTERNALS
    1339             :   #if PY_VERSION_HEX >= 0x030C00A7
    1340             :   #ifndef _PyLong_SIGN_MASK
    1341             :     #define _PyLong_SIGN_MASK 3
    1342             :   #endif
    1343             :   #ifndef _PyLong_NON_SIZE_BITS
    1344             :     #define _PyLong_NON_SIZE_BITS 3
    1345             :   #endif
    1346             :   #define __Pyx_PyLong_Sign(x)  (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
    1347             :   #define __Pyx_PyLong_IsNeg(x)  ((__Pyx_PyLong_Sign(x) & 2) != 0)
    1348             :   #define __Pyx_PyLong_IsNonNeg(x)  (!__Pyx_PyLong_IsNeg(x))
    1349             :   #define __Pyx_PyLong_IsZero(x)  (__Pyx_PyLong_Sign(x) & 1)
    1350             :   #define __Pyx_PyLong_IsPos(x)  (__Pyx_PyLong_Sign(x) == 0)
    1351             :   #define __Pyx_PyLong_CompactValueUnsigned(x)  (__Pyx_PyLong_Digits(x)[0])
    1352             :   #define __Pyx_PyLong_DigitCount(x)  ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
    1353             :   #define __Pyx_PyLong_SignedDigitCount(x)\
    1354             :         ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
    1355             :   #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
    1356             :     #define __Pyx_PyLong_IsCompact(x)     PyUnstable_Long_IsCompact((PyLongObject*) x)
    1357             :     #define __Pyx_PyLong_CompactValue(x)  PyUnstable_Long_CompactValue((PyLongObject*) x)
    1358             :   #else
    1359             :     #define __Pyx_PyLong_IsCompact(x)     (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
    1360             :     #define __Pyx_PyLong_CompactValue(x)  ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
    1361             :   #endif
    1362             :   typedef Py_ssize_t  __Pyx_compact_pylong;
    1363             :   typedef size_t  __Pyx_compact_upylong;
    1364             :   #else
    1365             :   #define __Pyx_PyLong_IsNeg(x)  (Py_SIZE(x) < 0)
    1366             :   #define __Pyx_PyLong_IsNonNeg(x)  (Py_SIZE(x) >= 0)
    1367             :   #define __Pyx_PyLong_IsZero(x)  (Py_SIZE(x) == 0)
    1368             :   #define __Pyx_PyLong_IsPos(x)  (Py_SIZE(x) > 0)
    1369             :   #define __Pyx_PyLong_CompactValueUnsigned(x)  ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
    1370             :   #define __Pyx_PyLong_DigitCount(x)  __Pyx_sst_abs(Py_SIZE(x))
    1371             :   #define __Pyx_PyLong_SignedDigitCount(x)  Py_SIZE(x)
    1372             :   #define __Pyx_PyLong_IsCompact(x)  (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
    1373             :   #define __Pyx_PyLong_CompactValue(x)\
    1374             :         ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
    1375             :   typedef sdigit  __Pyx_compact_pylong;
    1376             :   typedef digit  __Pyx_compact_upylong;
    1377             :   #endif
    1378             :   #if PY_VERSION_HEX >= 0x030C00A5
    1379             :   #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->long_value.ob_digit)
    1380             :   #else
    1381             :   #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->ob_digit)
    1382             :   #endif
    1383             : #endif
    1384             : #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    1385             : #include <string.h>
    1386             : static int __Pyx_sys_getdefaultencoding_not_ascii;
    1387             : static int __Pyx_init_sys_getdefaultencoding_params(void) {
    1388             :     PyObject* sys;
    1389             :     PyObject* default_encoding = NULL;
    1390             :     PyObject* ascii_chars_u = NULL;
    1391             :     PyObject* ascii_chars_b = NULL;
    1392             :     const char* default_encoding_c;
    1393             :     sys = PyImport_ImportModule("sys");
    1394             :     if (!sys) goto bad;
    1395             :     default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    1396             :     Py_DECREF(sys);
    1397             :     if (!default_encoding) goto bad;
    1398             :     default_encoding_c = PyBytes_AsString(default_encoding);
    1399             :     if (!default_encoding_c) goto bad;
    1400             :     if (strcmp(default_encoding_c, "ascii") == 0) {
    1401             :         __Pyx_sys_getdefaultencoding_not_ascii = 0;
    1402             :     } else {
    1403             :         char ascii_chars[128];
    1404             :         int c;
    1405             :         for (c = 0; c < 128; c++) {
    1406             :             ascii_chars[c] = (char) c;
    1407             :         }
    1408             :         __Pyx_sys_getdefaultencoding_not_ascii = 1;
    1409             :         ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
    1410             :         if (!ascii_chars_u) goto bad;
    1411             :         ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
    1412             :         if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
    1413             :             PyErr_Format(
    1414             :                 PyExc_ValueError,
    1415             :                 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
    1416             :                 default_encoding_c);
    1417             :             goto bad;
    1418             :         }
    1419             :         Py_DECREF(ascii_chars_u);
    1420             :         Py_DECREF(ascii_chars_b);
    1421             :     }
    1422             :     Py_DECREF(default_encoding);
    1423             :     return 0;
    1424             : bad:
    1425             :     Py_XDECREF(default_encoding);
    1426             :     Py_XDECREF(ascii_chars_u);
    1427             :     Py_XDECREF(ascii_chars_b);
    1428             :     return -1;
    1429             : }
    1430             : #endif
    1431             : #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
    1432             : #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
    1433             : #else
    1434             : #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
    1435             : #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    1436             : #include <string.h>
    1437             : static char* __PYX_DEFAULT_STRING_ENCODING;
    1438             : static int __Pyx_init_sys_getdefaultencoding_params(void) {
    1439             :     PyObject* sys;
    1440             :     PyObject* default_encoding = NULL;
    1441             :     char* default_encoding_c;
    1442             :     sys = PyImport_ImportModule("sys");
    1443             :     if (!sys) goto bad;
    1444             :     default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    1445             :     Py_DECREF(sys);
    1446             :     if (!default_encoding) goto bad;
    1447             :     default_encoding_c = PyBytes_AsString(default_encoding);
    1448             :     if (!default_encoding_c) goto bad;
    1449             :     __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    1450             :     if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    1451             :     strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    1452             :     Py_DECREF(default_encoding);
    1453             :     return 0;
    1454             : bad:
    1455             :     Py_XDECREF(default_encoding);
    1456             :     return -1;
    1457             : }
    1458             : #endif
    1459             : #endif
    1460             : 
    1461             : 
    1462             : /* Test for GCC > 2.95 */
    1463             : #if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
    1464             :   #define likely(x)   __builtin_expect(!!(x), 1)
    1465             :   #define unlikely(x) __builtin_expect(!!(x), 0)
    1466             : #else /* !__GNUC__ or GCC < 2.95 */
    1467             :   #define likely(x)   (x)
    1468             :   #define unlikely(x) (x)
    1469             : #endif /* __GNUC__ */
    1470             : static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
    1471             : 
    1472             : #if !CYTHON_USE_MODULE_STATE
    1473             : static PyObject *__pyx_m = NULL;
    1474             : #endif
    1475             : static int __pyx_lineno;
    1476             : static int __pyx_clineno = 0;
    1477             : static const char * __pyx_cfilenm = __FILE__;
    1478             : static const char *__pyx_filename;
    1479             : 
    1480             : /* Header.proto */
    1481             : #if !defined(CYTHON_CCOMPLEX)
    1482             :   #if defined(__cplusplus)
    1483             :     #define CYTHON_CCOMPLEX 1
    1484             :   #elif (defined(_Complex_I) && !defined(_MSC_VER)) || ((defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_COMPLEX__) && !defined(_MSC_VER))
    1485             :     #define CYTHON_CCOMPLEX 1
    1486             :   #else
    1487             :     #define CYTHON_CCOMPLEX 0
    1488             :   #endif
    1489             : #endif
    1490             : #if CYTHON_CCOMPLEX
    1491             :   #ifdef __cplusplus
    1492             :     #include <complex>
    1493             :   #else
    1494             :     #include <complex.h>
    1495             :   #endif
    1496             : #endif
    1497             : #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
    1498             :   #undef _Complex_I
    1499             :   #define _Complex_I 1.0fj
    1500             : #endif
    1501             : 
    1502             : /* #### Code section: filename_table ### */
    1503             : 
    1504             : static const char *__pyx_f[] = {
    1505             :   "_matching.pyx",
    1506             :   "<stringsource>",
    1507             :   "__init__.cython-30.pxd",
    1508             :   "type.pxd",
    1509             :   "parameters.pxi",
    1510             : };
    1511             : /* #### Code section: utility_code_proto_before_types ### */
    1512             : /* ForceInitThreads.proto */
    1513             : #ifndef __PYX_FORCE_INIT_THREADS
    1514             :   #define __PYX_FORCE_INIT_THREADS 0
    1515             : #endif
    1516             : 
    1517             : /* NoFastGil.proto */
    1518             : #define __Pyx_PyGILState_Ensure PyGILState_Ensure
    1519             : #define __Pyx_PyGILState_Release PyGILState_Release
    1520             : #define __Pyx_FastGIL_Remember()
    1521             : #define __Pyx_FastGIL_Forget()
    1522             : #define __Pyx_FastGilFuncInit()
    1523             : 
    1524             : /* BufferFormatStructs.proto */
    1525             : struct __Pyx_StructField_;
    1526             : #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
    1527             : typedef struct {
    1528             :   const char* name;
    1529             :   struct __Pyx_StructField_* fields;
    1530             :   size_t size;
    1531             :   size_t arraysize[8];
    1532             :   int ndim;
    1533             :   char typegroup;
    1534             :   char is_unsigned;
    1535             :   int flags;
    1536             : } __Pyx_TypeInfo;
    1537             : typedef struct __Pyx_StructField_ {
    1538             :   __Pyx_TypeInfo* type;
    1539             :   const char* name;
    1540             :   size_t offset;
    1541             : } __Pyx_StructField;
    1542             : typedef struct {
    1543             :   __Pyx_StructField* field;
    1544             :   size_t parent_offset;
    1545             : } __Pyx_BufFmt_StackElem;
    1546             : typedef struct {
    1547             :   __Pyx_StructField root;
    1548             :   __Pyx_BufFmt_StackElem* head;
    1549             :   size_t fmt_offset;
    1550             :   size_t new_count, enc_count;
    1551             :   size_t struct_alignment;
    1552             :   int is_complex;
    1553             :   char enc_type;
    1554             :   char new_packmode;
    1555             :   char enc_packmode;
    1556             :   char is_valid_array;
    1557             : } __Pyx_BufFmt_Context;
    1558             : 
    1559             : /* Atomics.proto */
    1560             : #include <pythread.h>
    1561             : #ifndef CYTHON_ATOMICS
    1562             :     #define CYTHON_ATOMICS 1
    1563             : #endif
    1564             : #define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
    1565             : #define __pyx_atomic_int_type int
    1566             : #define __pyx_nonatomic_int_type int
    1567             : #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
    1568             :                         (__STDC_VERSION__ >= 201112L) &&\
    1569             :                         !defined(__STDC_NO_ATOMICS__))
    1570             :     #include <stdatomic.h>
    1571             : #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
    1572             :                     (__cplusplus >= 201103L) ||\
    1573             :                     (defined(_MSC_VER) && _MSC_VER >= 1700)))
    1574             :     #include <atomic>
    1575             : #endif
    1576             : #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
    1577             :                         (__STDC_VERSION__ >= 201112L) &&\
    1578             :                         !defined(__STDC_NO_ATOMICS__) &&\
    1579             :                        ATOMIC_INT_LOCK_FREE == 2)
    1580             :     #undef __pyx_atomic_int_type
    1581             :     #define __pyx_atomic_int_type atomic_int
    1582             :     #define __pyx_atomic_incr_aligned(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
    1583             :     #define __pyx_atomic_decr_aligned(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
    1584             :     #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
    1585             :         #pragma message ("Using standard C atomics")
    1586             :     #elif defined(__PYX_DEBUG_ATOMICS)
    1587             :         #warning "Using standard C atomics"
    1588             :     #endif
    1589             : #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
    1590             :                     (__cplusplus >= 201103L) ||\
    1591             : \
    1592             :                     (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
    1593             :                     ATOMIC_INT_LOCK_FREE == 2)
    1594             :     #undef __pyx_atomic_int_type
    1595             :     #define __pyx_atomic_int_type std::atomic_int
    1596             :     #define __pyx_atomic_incr_aligned(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
    1597             :     #define __pyx_atomic_decr_aligned(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
    1598             :     #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
    1599             :         #pragma message ("Using standard C++ atomics")
    1600             :     #elif defined(__PYX_DEBUG_ATOMICS)
    1601             :         #warning "Using standard C++ atomics"
    1602             :     #endif
    1603             : #elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
    1604             :                     (__GNUC_MINOR__ > 1 ||\
    1605             :                     (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
    1606             :     #define __pyx_atomic_incr_aligned(value) __sync_fetch_and_add(value, 1)
    1607             :     #define __pyx_atomic_decr_aligned(value) __sync_fetch_and_sub(value, 1)
    1608             :     #ifdef __PYX_DEBUG_ATOMICS
    1609             :         #warning "Using GNU atomics"
    1610             :     #endif
    1611             : #elif CYTHON_ATOMICS && defined(_MSC_VER)
    1612             :     #include <intrin.h>
    1613             :     #undef __pyx_atomic_int_type
    1614             :     #define __pyx_atomic_int_type long
    1615             :     #undef __pyx_nonatomic_int_type
    1616             :     #define __pyx_nonatomic_int_type long
    1617             :     #pragma intrinsic (_InterlockedExchangeAdd)
    1618             :     #define __pyx_atomic_incr_aligned(value) _InterlockedExchangeAdd(value, 1)
    1619             :     #define __pyx_atomic_decr_aligned(value) _InterlockedExchangeAdd(value, -1)
    1620             :     #ifdef __PYX_DEBUG_ATOMICS
    1621             :         #pragma message ("Using MSVC atomics")
    1622             :     #endif
    1623             : #else
    1624             :     #undef CYTHON_ATOMICS
    1625             :     #define CYTHON_ATOMICS 0
    1626             :     #ifdef __PYX_DEBUG_ATOMICS
    1627             :         #warning "Not using atomics"
    1628             :     #endif
    1629             : #endif
    1630             : #if CYTHON_ATOMICS
    1631             :     #define __pyx_add_acquisition_count(memview)\
    1632             :              __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview))
    1633             :     #define __pyx_sub_acquisition_count(memview)\
    1634             :             __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview))
    1635             : #else
    1636             :     #define __pyx_add_acquisition_count(memview)\
    1637             :             __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
    1638             :     #define __pyx_sub_acquisition_count(memview)\
    1639             :             __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
    1640             : #endif
    1641             : 
    1642             : /* MemviewSliceStruct.proto */
    1643             : struct __pyx_memoryview_obj;
    1644             : typedef struct {
    1645             :   struct __pyx_memoryview_obj *memview;
    1646             :   char *data;
    1647             :   Py_ssize_t shape[8];
    1648             :   Py_ssize_t strides[8];
    1649             :   Py_ssize_t suboffsets[8];
    1650             : } __Pyx_memviewslice;
    1651             : #define __Pyx_MemoryView_Len(m)  (m.shape[0])
    1652             : 
    1653             : /* #### Code section: numeric_typedefs ### */
    1654             : 
    1655             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":769
    1656             :  * # in Cython to enable them only on the right systems.
    1657             :  * 
    1658             :  * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
    1659             :  * ctypedef npy_int16      int16_t
    1660             :  * ctypedef npy_int32      int32_t
    1661             :  */
    1662             : typedef npy_int8 __pyx_t_5numpy_int8_t;
    1663             : 
    1664             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":770
    1665             :  * 
    1666             :  * ctypedef npy_int8       int8_t
    1667             :  * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
    1668             :  * ctypedef npy_int32      int32_t
    1669             :  * ctypedef npy_int64      int64_t
    1670             :  */
    1671             : typedef npy_int16 __pyx_t_5numpy_int16_t;
    1672             : 
    1673             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":771
    1674             :  * ctypedef npy_int8       int8_t
    1675             :  * ctypedef npy_int16      int16_t
    1676             :  * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
    1677             :  * ctypedef npy_int64      int64_t
    1678             :  * #ctypedef npy_int96      int96_t
    1679             :  */
    1680             : typedef npy_int32 __pyx_t_5numpy_int32_t;
    1681             : 
    1682             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":772
    1683             :  * ctypedef npy_int16      int16_t
    1684             :  * ctypedef npy_int32      int32_t
    1685             :  * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
    1686             :  * #ctypedef npy_int96      int96_t
    1687             :  * #ctypedef npy_int128     int128_t
    1688             :  */
    1689             : typedef npy_int64 __pyx_t_5numpy_int64_t;
    1690             : 
    1691             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":776
    1692             :  * #ctypedef npy_int128     int128_t
    1693             :  * 
    1694             :  * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
    1695             :  * ctypedef npy_uint16     uint16_t
    1696             :  * ctypedef npy_uint32     uint32_t
    1697             :  */
    1698             : typedef npy_uint8 __pyx_t_5numpy_uint8_t;
    1699             : 
    1700             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":777
    1701             :  * 
    1702             :  * ctypedef npy_uint8      uint8_t
    1703             :  * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
    1704             :  * ctypedef npy_uint32     uint32_t
    1705             :  * ctypedef npy_uint64     uint64_t
    1706             :  */
    1707             : typedef npy_uint16 __pyx_t_5numpy_uint16_t;
    1708             : 
    1709             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":778
    1710             :  * ctypedef npy_uint8      uint8_t
    1711             :  * ctypedef npy_uint16     uint16_t
    1712             :  * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
    1713             :  * ctypedef npy_uint64     uint64_t
    1714             :  * #ctypedef npy_uint96     uint96_t
    1715             :  */
    1716             : typedef npy_uint32 __pyx_t_5numpy_uint32_t;
    1717             : 
    1718             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":779
    1719             :  * ctypedef npy_uint16     uint16_t
    1720             :  * ctypedef npy_uint32     uint32_t
    1721             :  * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
    1722             :  * #ctypedef npy_uint96     uint96_t
    1723             :  * #ctypedef npy_uint128    uint128_t
    1724             :  */
    1725             : typedef npy_uint64 __pyx_t_5numpy_uint64_t;
    1726             : 
    1727             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":783
    1728             :  * #ctypedef npy_uint128    uint128_t
    1729             :  * 
    1730             :  * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
    1731             :  * ctypedef npy_float64    float64_t
    1732             :  * #ctypedef npy_float80    float80_t
    1733             :  */
    1734             : typedef npy_float32 __pyx_t_5numpy_float32_t;
    1735             : 
    1736             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":784
    1737             :  * 
    1738             :  * ctypedef npy_float32    float32_t
    1739             :  * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
    1740             :  * #ctypedef npy_float80    float80_t
    1741             :  * #ctypedef npy_float128   float128_t
    1742             :  */
    1743             : typedef npy_float64 __pyx_t_5numpy_float64_t;
    1744             : 
    1745             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":791
    1746             :  * ctypedef double complex complex128_t
    1747             :  * 
    1748             :  * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
    1749             :  * ctypedef npy_ulonglong  ulonglong_t
    1750             :  * 
    1751             :  */
    1752             : typedef npy_longlong __pyx_t_5numpy_longlong_t;
    1753             : 
    1754             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":792
    1755             :  * 
    1756             :  * ctypedef npy_longlong   longlong_t
    1757             :  * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
    1758             :  * 
    1759             :  * ctypedef npy_intp       intp_t
    1760             :  */
    1761             : typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
    1762             : 
    1763             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":794
    1764             :  * ctypedef npy_ulonglong  ulonglong_t
    1765             :  * 
    1766             :  * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
    1767             :  * ctypedef npy_uintp      uintp_t
    1768             :  * 
    1769             :  */
    1770             : typedef npy_intp __pyx_t_5numpy_intp_t;
    1771             : 
    1772             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":795
    1773             :  * 
    1774             :  * ctypedef npy_intp       intp_t
    1775             :  * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
    1776             :  * 
    1777             :  * ctypedef npy_double     float_t
    1778             :  */
    1779             : typedef npy_uintp __pyx_t_5numpy_uintp_t;
    1780             : 
    1781             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":797
    1782             :  * ctypedef npy_uintp      uintp_t
    1783             :  * 
    1784             :  * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
    1785             :  * ctypedef npy_double     double_t
    1786             :  * ctypedef npy_longdouble longdouble_t
    1787             :  */
    1788             : typedef npy_double __pyx_t_5numpy_float_t;
    1789             : 
    1790             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":798
    1791             :  * 
    1792             :  * ctypedef npy_double     float_t
    1793             :  * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
    1794             :  * ctypedef npy_longdouble longdouble_t
    1795             :  * 
    1796             :  */
    1797             : typedef npy_double __pyx_t_5numpy_double_t;
    1798             : 
    1799             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":799
    1800             :  * ctypedef npy_double     float_t
    1801             :  * ctypedef npy_double     double_t
    1802             :  * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
    1803             :  * 
    1804             :  * ctypedef float complex       cfloat_t
    1805             :  */
    1806             : typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
    1807             : 
    1808             : /* "../scipy/sparse/csgraph/parameters.pxi":3
    1809             :  * 
    1810             :  * DTYPE = np.float64
    1811             :  * ctypedef np.float64_t DTYPE_t             # <<<<<<<<<<<<<<
    1812             :  * 
    1813             :  * ITYPE = np.int32
    1814             :  */
    1815             : typedef __pyx_t_5numpy_float64_t __pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t;
    1816             : 
    1817             : /* "../scipy/sparse/csgraph/parameters.pxi":6
    1818             :  * 
    1819             :  * ITYPE = np.int32
    1820             :  * ctypedef np.int32_t ITYPE_t             # <<<<<<<<<<<<<<
    1821             :  * 
    1822             :  * # Fused type for int32 and int64
    1823             :  */
    1824             : typedef __pyx_t_5numpy_int32_t __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t;
    1825             : 
    1826             : /* "scipy/sparse/csgraph/_matching.pyx":531
    1827             :  * # We will use uint8 to represent booleans to simplify arrays of booleans below.
    1828             :  * BTYPE = np.uint8
    1829             :  * ctypedef np.uint8_t BTYPE_t             # <<<<<<<<<<<<<<
    1830             :  * 
    1831             :  * 
    1832             :  */
    1833             : typedef __pyx_t_5numpy_uint8_t __pyx_t_5scipy_6sparse_7csgraph_9_matching_BTYPE_t;
    1834             : /* #### Code section: complex_type_declarations ### */
    1835             : /* Declarations.proto */
    1836             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    1837             :   #ifdef __cplusplus
    1838             :     typedef ::std::complex< float > __pyx_t_float_complex;
    1839             :   #else
    1840             :     typedef float _Complex __pyx_t_float_complex;
    1841             :   #endif
    1842             : #else
    1843             :     typedef struct { float real, imag; } __pyx_t_float_complex;
    1844             : #endif
    1845             : static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
    1846             : 
    1847             : /* Declarations.proto */
    1848             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    1849             :   #ifdef __cplusplus
    1850             :     typedef ::std::complex< double > __pyx_t_double_complex;
    1851             :   #else
    1852             :     typedef double _Complex __pyx_t_double_complex;
    1853             :   #endif
    1854             : #else
    1855             :     typedef struct { double real, imag; } __pyx_t_double_complex;
    1856             : #endif
    1857             : static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
    1858             : 
    1859             : /* Declarations.proto */
    1860             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    1861             :   #ifdef __cplusplus
    1862             :     typedef ::std::complex< long double > __pyx_t_long_double_complex;
    1863             :   #else
    1864             :     typedef long double _Complex __pyx_t_long_double_complex;
    1865             :   #endif
    1866             : #else
    1867             :     typedef struct { long double real, imag; } __pyx_t_long_double_complex;
    1868             : #endif
    1869             : static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double, long double);
    1870             : 
    1871             : /* #### Code section: type_declarations ### */
    1872             : 
    1873             : /*--- Type declarations ---*/
    1874             : struct __pyx_array_obj;
    1875             : struct __pyx_MemviewEnum_obj;
    1876             : struct __pyx_memoryview_obj;
    1877             : struct __pyx_memoryviewslice_obj;
    1878             : 
    1879             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1095
    1880             :  * 
    1881             :  * # Iterator API added in v1.6
    1882             :  * ctypedef int (*NpyIter_IterNextFunc)(NpyIter* it) noexcept nogil             # <<<<<<<<<<<<<<
    1883             :  * ctypedef void (*NpyIter_GetMultiIndexFunc)(NpyIter* it, npy_intp* outcoords) noexcept nogil
    1884             :  * 
    1885             :  */
    1886             : typedef int (*__pyx_t_5numpy_NpyIter_IterNextFunc)(NpyIter *);
    1887             : 
    1888             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1096
    1889             :  * # Iterator API added in v1.6
    1890             :  * ctypedef int (*NpyIter_IterNextFunc)(NpyIter* it) noexcept nogil
    1891             :  * ctypedef void (*NpyIter_GetMultiIndexFunc)(NpyIter* it, npy_intp* outcoords) noexcept nogil             # <<<<<<<<<<<<<<
    1892             :  * 
    1893             :  * cdef extern from "numpy/arrayobject.h":
    1894             :  */
    1895             : typedef void (*__pyx_t_5numpy_NpyIter_GetMultiIndexFunc)(NpyIter *, npy_intp *);
    1896             : 
    1897             : /* "View.MemoryView":114
    1898             :  * @cython.collection_type("sequence")
    1899             :  * @cname("__pyx_array")
    1900             :  * cdef class array:             # <<<<<<<<<<<<<<
    1901             :  * 
    1902             :  *     cdef:
    1903             :  */
    1904             : struct __pyx_array_obj {
    1905             :   PyObject_HEAD
    1906             :   struct __pyx_vtabstruct_array *__pyx_vtab;
    1907             :   char *data;
    1908             :   Py_ssize_t len;
    1909             :   char *format;
    1910             :   int ndim;
    1911             :   Py_ssize_t *_shape;
    1912             :   Py_ssize_t *_strides;
    1913             :   Py_ssize_t itemsize;
    1914             :   PyObject *mode;
    1915             :   PyObject *_format;
    1916             :   void (*callback_free_data)(void *);
    1917             :   int free_data;
    1918             :   int dtype_is_object;
    1919             : };
    1920             : 
    1921             : 
    1922             : /* "View.MemoryView":302
    1923             :  * 
    1924             :  * @cname('__pyx_MemviewEnum')
    1925             :  * cdef class Enum(object):             # <<<<<<<<<<<<<<
    1926             :  *     cdef object name
    1927             :  *     def __init__(self, name):
    1928             :  */
    1929             : struct __pyx_MemviewEnum_obj {
    1930             :   PyObject_HEAD
    1931             :   PyObject *name;
    1932             : };
    1933             : 
    1934             : 
    1935             : /* "View.MemoryView":337
    1936             :  * 
    1937             :  * @cname('__pyx_memoryview')
    1938             :  * cdef class memoryview:             # <<<<<<<<<<<<<<
    1939             :  * 
    1940             :  *     cdef object obj
    1941             :  */
    1942             : struct __pyx_memoryview_obj {
    1943             :   PyObject_HEAD
    1944             :   struct __pyx_vtabstruct_memoryview *__pyx_vtab;
    1945             :   PyObject *obj;
    1946             :   PyObject *_size;
    1947             :   PyObject *_array_interface;
    1948             :   PyThread_type_lock lock;
    1949             :   __pyx_atomic_int_type acquisition_count;
    1950             :   Py_buffer view;
    1951             :   int flags;
    1952             :   int dtype_is_object;
    1953             :   __Pyx_TypeInfo *typeinfo;
    1954             : };
    1955             : 
    1956             : 
    1957             : /* "View.MemoryView":952
    1958             :  * @cython.collection_type("sequence")
    1959             :  * @cname('__pyx_memoryviewslice')
    1960             :  * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
    1961             :  *     "Internal class for passing memoryview slices to Python"
    1962             :  * 
    1963             :  */
    1964             : struct __pyx_memoryviewslice_obj {
    1965             :   struct __pyx_memoryview_obj __pyx_base;
    1966             :   __Pyx_memviewslice from_slice;
    1967             :   PyObject *from_object;
    1968             :   PyObject *(*to_object_func)(char *);
    1969             :   int (*to_dtype_func)(char *, PyObject *);
    1970             : };
    1971             : 
    1972             : 
    1973             : 
    1974             : /* "View.MemoryView":114
    1975             :  * @cython.collection_type("sequence")
    1976             :  * @cname("__pyx_array")
    1977             :  * cdef class array:             # <<<<<<<<<<<<<<
    1978             :  * 
    1979             :  *     cdef:
    1980             :  */
    1981             : 
    1982             : struct __pyx_vtabstruct_array {
    1983             :   PyObject *(*get_memview)(struct __pyx_array_obj *);
    1984             : };
    1985             : static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
    1986             : 
    1987             : 
    1988             : /* "View.MemoryView":337
    1989             :  * 
    1990             :  * @cname('__pyx_memoryview')
    1991             :  * cdef class memoryview:             # <<<<<<<<<<<<<<
    1992             :  * 
    1993             :  *     cdef object obj
    1994             :  */
    1995             : 
    1996             : struct __pyx_vtabstruct_memoryview {
    1997             :   char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
    1998             :   PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
    1999             :   PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
    2000             :   PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
    2001             :   PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
    2002             :   PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
    2003             :   PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
    2004             :   PyObject *(*_get_base)(struct __pyx_memoryview_obj *);
    2005             : };
    2006             : static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
    2007             : 
    2008             : 
    2009             : /* "View.MemoryView":952
    2010             :  * @cython.collection_type("sequence")
    2011             :  * @cname('__pyx_memoryviewslice')
    2012             :  * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
    2013             :  *     "Internal class for passing memoryview slices to Python"
    2014             :  * 
    2015             :  */
    2016             : 
    2017             : struct __pyx_vtabstruct__memoryviewslice {
    2018             :   struct __pyx_vtabstruct_memoryview __pyx_base;
    2019             : };
    2020             : static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
    2021             : /* #### Code section: utility_code_proto ### */
    2022             : 
    2023             : /* --- Runtime support code (head) --- */
    2024             : /* Refnanny.proto */
    2025             : #ifndef CYTHON_REFNANNY
    2026             :   #define CYTHON_REFNANNY 0
    2027             : #endif
    2028             : #if CYTHON_REFNANNY
    2029             :   typedef struct {
    2030             :     void (*INCREF)(void*, PyObject*, Py_ssize_t);
    2031             :     void (*DECREF)(void*, PyObject*, Py_ssize_t);
    2032             :     void (*GOTREF)(void*, PyObject*, Py_ssize_t);
    2033             :     void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
    2034             :     void* (*SetupContext)(const char*, Py_ssize_t, const char*);
    2035             :     void (*FinishContext)(void**);
    2036             :   } __Pyx_RefNannyAPIStruct;
    2037             :   static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
    2038             :   static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
    2039             :   #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
    2040             : #ifdef WITH_THREAD
    2041             :   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
    2042             :           if (acquire_gil) {\
    2043             :               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
    2044             :               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
    2045             :               PyGILState_Release(__pyx_gilstate_save);\
    2046             :           } else {\
    2047             :               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
    2048             :           }
    2049             :   #define __Pyx_RefNannyFinishContextNogil() {\
    2050             :               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
    2051             :               __Pyx_RefNannyFinishContext();\
    2052             :               PyGILState_Release(__pyx_gilstate_save);\
    2053             :           }
    2054             : #else
    2055             :   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
    2056             :           __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__))
    2057             :   #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext()
    2058             : #endif
    2059             :   #define __Pyx_RefNannyFinishContextNogil() {\
    2060             :               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
    2061             :               __Pyx_RefNannyFinishContext();\
    2062             :               PyGILState_Release(__pyx_gilstate_save);\
    2063             :           }
    2064             :   #define __Pyx_RefNannyFinishContext()\
    2065             :           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
    2066             :   #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
    2067             :   #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
    2068             :   #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
    2069             :   #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
    2070             :   #define __Pyx_XINCREF(r)  do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
    2071             :   #define __Pyx_XDECREF(r)  do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
    2072             :   #define __Pyx_XGOTREF(r)  do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
    2073             :   #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
    2074             : #else
    2075             :   #define __Pyx_RefNannyDeclarations
    2076             :   #define __Pyx_RefNannySetupContext(name, acquire_gil)
    2077             :   #define __Pyx_RefNannyFinishContextNogil()
    2078             :   #define __Pyx_RefNannyFinishContext()
    2079             :   #define __Pyx_INCREF(r) Py_INCREF(r)
    2080             :   #define __Pyx_DECREF(r) Py_DECREF(r)
    2081             :   #define __Pyx_GOTREF(r)
    2082             :   #define __Pyx_GIVEREF(r)
    2083             :   #define __Pyx_XINCREF(r) Py_XINCREF(r)
    2084             :   #define __Pyx_XDECREF(r) Py_XDECREF(r)
    2085             :   #define __Pyx_XGOTREF(r)
    2086             :   #define __Pyx_XGIVEREF(r)
    2087             : #endif
    2088             : #define __Pyx_Py_XDECREF_SET(r, v) do {\
    2089             :         PyObject *tmp = (PyObject *) r;\
    2090             :         r = v; Py_XDECREF(tmp);\
    2091             :     } while (0)
    2092             : #define __Pyx_XDECREF_SET(r, v) do {\
    2093             :         PyObject *tmp = (PyObject *) r;\
    2094             :         r = v; __Pyx_XDECREF(tmp);\
    2095             :     } while (0)
    2096             : #define __Pyx_DECREF_SET(r, v) do {\
    2097             :         PyObject *tmp = (PyObject *) r;\
    2098             :         r = v; __Pyx_DECREF(tmp);\
    2099             :     } while (0)
    2100             : #define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
    2101             : #define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
    2102             : 
    2103             : /* PyErrExceptionMatches.proto */
    2104             : #if CYTHON_FAST_THREAD_STATE
    2105             : #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
    2106             : static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
    2107             : #else
    2108             : #define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
    2109             : #endif
    2110             : 
    2111             : /* PyThreadStateGet.proto */
    2112             : #if CYTHON_FAST_THREAD_STATE
    2113             : #define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
    2114             : #define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
    2115             : #if PY_VERSION_HEX >= 0x030C00A6
    2116             : #define __Pyx_PyErr_Occurred()  (__pyx_tstate->current_exception != NULL)
    2117             : #define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
    2118             : #else
    2119             : #define __Pyx_PyErr_Occurred()  (__pyx_tstate->curexc_type != NULL)
    2120             : #define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->curexc_type)
    2121             : #endif
    2122             : #else
    2123             : #define __Pyx_PyThreadState_declare
    2124             : #define __Pyx_PyThreadState_assign
    2125             : #define __Pyx_PyErr_Occurred()  (PyErr_Occurred() != NULL)
    2126             : #define __Pyx_PyErr_CurrentExceptionType()  PyErr_Occurred()
    2127             : #endif
    2128             : 
    2129             : /* PyErrFetchRestore.proto */
    2130             : #if CYTHON_FAST_THREAD_STATE
    2131             : #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
    2132             : #define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
    2133             : #define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
    2134             : #define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
    2135             : #define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
    2136             : static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
    2137             : static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
    2138             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
    2139             : #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
    2140             : #else
    2141             : #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
    2142             : #endif
    2143             : #else
    2144             : #define __Pyx_PyErr_Clear() PyErr_Clear()
    2145             : #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
    2146             : #define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
    2147             : #define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
    2148             : #define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
    2149             : #define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
    2150             : #define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
    2151             : #define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
    2152             : #endif
    2153             : 
    2154             : /* PyObjectGetAttrStr.proto */
    2155             : #if CYTHON_USE_TYPE_SLOTS
    2156             : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
    2157             : #else
    2158             : #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
    2159             : #endif
    2160             : 
    2161             : /* PyObjectGetAttrStrNoError.proto */
    2162             : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
    2163             : 
    2164             : /* GetBuiltinName.proto */
    2165             : static PyObject *__Pyx_GetBuiltinName(PyObject *name);
    2166             : 
    2167             : /* TupleAndListFromArray.proto */
    2168             : #if CYTHON_COMPILING_IN_CPYTHON
    2169             : static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
    2170             : static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
    2171             : #endif
    2172             : 
    2173             : /* IncludeStringH.proto */
    2174             : #include <string.h>
    2175             : 
    2176             : /* BytesEquals.proto */
    2177             : static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
    2178             : 
    2179             : /* UnicodeEquals.proto */
    2180             : static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
    2181             : 
    2182             : /* fastcall.proto */
    2183             : #if CYTHON_AVOID_BORROWED_REFS
    2184             :     #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i)
    2185             : #elif CYTHON_ASSUME_SAFE_MACROS
    2186             :     #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i)
    2187             : #else
    2188             :     #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i)
    2189             : #endif
    2190             : #if CYTHON_AVOID_BORROWED_REFS
    2191             :     #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg)
    2192             :     #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg)
    2193             : #else
    2194             :     #define __Pyx_Arg_NewRef_VARARGS(arg) arg
    2195             :     #define __Pyx_Arg_XDECREF_VARARGS(arg)
    2196             : #endif
    2197             : #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
    2198             : #define __Pyx_KwValues_VARARGS(args, nargs) NULL
    2199             : #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
    2200             : #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
    2201             : #if CYTHON_METH_FASTCALL
    2202             :     #define __Pyx_Arg_FASTCALL(args, i) args[i]
    2203             :     #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds)
    2204             :     #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
    2205             :     static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
    2206             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
    2207             :     CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
    2208             :   #else
    2209             :     #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
    2210             :   #endif
    2211             :     #define __Pyx_Arg_NewRef_FASTCALL(arg) arg  /* no-op, __Pyx_Arg_FASTCALL is direct and this needs
    2212             :                                                    to have the same reference counting */
    2213             :     #define __Pyx_Arg_XDECREF_FASTCALL(arg)
    2214             : #else
    2215             :     #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS
    2216             :     #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
    2217             :     #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
    2218             :     #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
    2219             :     #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
    2220             :     #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg)
    2221             :     #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg)
    2222             : #endif
    2223             : #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    2224             : #define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start)
    2225             : #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start)
    2226             : #else
    2227             : #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
    2228             : #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
    2229             : #endif
    2230             : 
    2231             : /* RaiseArgTupleInvalid.proto */
    2232             : static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    2233             :     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
    2234             : 
    2235             : /* RaiseDoubleKeywords.proto */
    2236             : static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
    2237             : 
    2238             : /* ParseKeywords.proto */
    2239             : static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues,
    2240             :     PyObject **argnames[],
    2241             :     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,
    2242             :     const char* function_name);
    2243             : 
    2244             : /* ArgTypeTest.proto */
    2245             : #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    2246             :     ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
    2247             :         __Pyx__ArgTypeTest(obj, type, name, exact))
    2248             : static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
    2249             : 
    2250             : /* RaiseException.proto */
    2251             : static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
    2252             : 
    2253             : /* PyFunctionFastCall.proto */
    2254             : #if CYTHON_FAST_PYCALL
    2255             : #if !CYTHON_VECTORCALL
    2256             : #define __Pyx_PyFunction_FastCall(func, args, nargs)\
    2257             :     __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
    2258             : static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
    2259             : #endif
    2260             : #define __Pyx_BUILD_ASSERT_EXPR(cond)\
    2261             :     (sizeof(char [1 - 2*!(cond)]) - 1)
    2262             : #ifndef Py_MEMBER_SIZE
    2263             : #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
    2264             : #endif
    2265             : #if !CYTHON_VECTORCALL
    2266             : #if PY_VERSION_HEX >= 0x03080000
    2267             :   #include "frameobject.h"
    2268             : #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
    2269             :   #ifndef Py_BUILD_CORE
    2270             :     #define Py_BUILD_CORE 1
    2271             :   #endif
    2272             :   #include "internal/pycore_frame.h"
    2273             : #endif
    2274             :   #define __Pxy_PyFrame_Initialize_Offsets()
    2275             :   #define __Pyx_PyFrame_GetLocalsplus(frame)  ((frame)->f_localsplus)
    2276             : #else
    2277             :   static size_t __pyx_pyframe_localsplus_offset = 0;
    2278             :   #include "frameobject.h"
    2279             :   #define __Pxy_PyFrame_Initialize_Offsets()\
    2280             :     ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
    2281             :      (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
    2282             :   #define __Pyx_PyFrame_GetLocalsplus(frame)\
    2283             :     (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
    2284             : #endif
    2285             : #endif
    2286             : #endif
    2287             : 
    2288             : /* PyObjectCall.proto */
    2289             : #if CYTHON_COMPILING_IN_CPYTHON
    2290             : static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
    2291             : #else
    2292             : #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
    2293             : #endif
    2294             : 
    2295             : /* PyObjectCallMethO.proto */
    2296             : #if CYTHON_COMPILING_IN_CPYTHON
    2297             : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
    2298             : #endif
    2299             : 
    2300             : /* PyObjectFastCall.proto */
    2301             : #define __Pyx_PyObject_FastCall(func, args, nargs)  __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
    2302             : static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs);
    2303             : 
    2304             : /* RaiseUnexpectedTypeError.proto */
    2305             : static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);
    2306             : 
    2307             : /* GCCDiagnostics.proto */
    2308             : #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
    2309             : #define __Pyx_HAS_GCC_DIAGNOSTIC
    2310             : #endif
    2311             : 
    2312             : /* BuildPyUnicode.proto */
    2313             : static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
    2314             :                                                 int prepend_sign, char padding_char);
    2315             : 
    2316             : /* CIntToPyUnicode.proto */
    2317             : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char);
    2318             : 
    2319             : /* CIntToPyUnicode.proto */
    2320             : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char);
    2321             : 
    2322             : /* JoinPyUnicode.proto */
    2323             : static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
    2324             :                                       Py_UCS4 max_char);
    2325             : 
    2326             : /* StrEquals.proto */
    2327             : #if PY_MAJOR_VERSION >= 3
    2328             : #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
    2329             : #else
    2330             : #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
    2331             : #endif
    2332             : 
    2333             : /* PyObjectFormatSimple.proto */
    2334             : #if CYTHON_COMPILING_IN_PYPY
    2335             :     #define __Pyx_PyObject_FormatSimple(s, f) (\
    2336             :         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
    2337             :         PyObject_Format(s, f))
    2338             : #elif PY_MAJOR_VERSION < 3
    2339             :     #define __Pyx_PyObject_FormatSimple(s, f) (\
    2340             :         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
    2341             :         likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\
    2342             :         PyObject_Format(s, f))
    2343             : #elif CYTHON_USE_TYPE_SLOTS
    2344             :     #define __Pyx_PyObject_FormatSimple(s, f) (\
    2345             :         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
    2346             :         likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\
    2347             :         likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\
    2348             :         PyObject_Format(s, f))
    2349             : #else
    2350             :     #define __Pyx_PyObject_FormatSimple(s, f) (\
    2351             :         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
    2352             :         PyObject_Format(s, f))
    2353             : #endif
    2354             : 
    2355             : CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
    2356             : static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
    2357             : /* GetAttr.proto */
    2358             : static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
    2359             : 
    2360             : /* GetItemInt.proto */
    2361             : #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    2362             :     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    2363             :     __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    2364             :     (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
    2365             :                __Pyx_GetItemInt_Generic(o, to_py_func(i))))
    2366             : #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    2367             :     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    2368             :     __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    2369             :     (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
    2370             : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
    2371             :                                                               int wraparound, int boundscheck);
    2372             : #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    2373             :     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    2374             :     __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    2375             :     (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
    2376             : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
    2377             :                                                               int wraparound, int boundscheck);
    2378             : static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
    2379             : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
    2380             :                                                      int is_list, int wraparound, int boundscheck);
    2381             : 
    2382             : /* PyObjectCallOneArg.proto */
    2383             : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
    2384             : 
    2385             : /* ObjectGetItem.proto */
    2386             : #if CYTHON_USE_TYPE_SLOTS
    2387             : static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
    2388             : #else
    2389             : #define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
    2390             : #endif
    2391             : 
    2392             : /* KeywordStringCheck.proto */
    2393             : static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed);
    2394             : 
    2395             : /* DivInt[Py_ssize_t].proto */
    2396             : static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
    2397             : 
    2398             : /* UnaryNegOverflows.proto */
    2399             : #define __Pyx_UNARY_NEG_WOULD_OVERFLOW(x)\
    2400             :         (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
    2401             : 
    2402             : /* GetAttr3.proto */
    2403             : static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
    2404             : 
    2405             : /* PyDictVersioning.proto */
    2406             : #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
    2407             : #define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
    2408             : #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
    2409             : #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    2410             :     (version_var) = __PYX_GET_DICT_VERSION(dict);\
    2411             :     (cache_var) = (value);
    2412             : #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    2413             :     static PY_UINT64_T __pyx_dict_version = 0;\
    2414             :     static PyObject *__pyx_dict_cached_value = NULL;\
    2415             :     if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
    2416             :         (VAR) = __pyx_dict_cached_value;\
    2417             :     } else {\
    2418             :         (VAR) = __pyx_dict_cached_value = (LOOKUP);\
    2419             :         __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    2420             :     }\
    2421             : }
    2422             : static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
    2423             : static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
    2424             : static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
    2425             : #else
    2426             : #define __PYX_GET_DICT_VERSION(dict)  (0)
    2427             : #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
    2428             : #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
    2429             : #endif
    2430             : 
    2431             : /* GetModuleGlobalName.proto */
    2432             : #if CYTHON_USE_DICT_VERSIONS
    2433             : #define __Pyx_GetModuleGlobalName(var, name)  do {\
    2434             :     static PY_UINT64_T __pyx_dict_version = 0;\
    2435             :     static PyObject *__pyx_dict_cached_value = NULL;\
    2436             :     (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
    2437             :         (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
    2438             :         __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
    2439             : } while(0)
    2440             : #define __Pyx_GetModuleGlobalNameUncached(var, name)  do {\
    2441             :     PY_UINT64_T __pyx_dict_version;\
    2442             :     PyObject *__pyx_dict_cached_value;\
    2443             :     (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
    2444             : } while(0)
    2445             : static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
    2446             : #else
    2447             : #define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
    2448             : #define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
    2449             : static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
    2450             : #endif
    2451             : 
    2452             : /* AssertionsEnabled.proto */
    2453             : #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
    2454             :   #define __Pyx_init_assertions_enabled()  (0)
    2455             :   #define __pyx_assertions_enabled()  (1)
    2456             : #elif CYTHON_COMPILING_IN_LIMITED_API  ||  (CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030C0000)
    2457             :   static int __pyx_assertions_enabled_flag;
    2458             :   #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
    2459           3 :   static int __Pyx_init_assertions_enabled(void) {
    2460           3 :     PyObject *builtins, *debug, *debug_str;
    2461           3 :     int flag;
    2462           3 :     builtins = PyEval_GetBuiltins();
    2463           3 :     if (!builtins) goto bad;
    2464           3 :     debug_str = PyUnicode_FromStringAndSize("__debug__", 9);
    2465           3 :     if (!debug_str) goto bad;
    2466           3 :     debug = PyObject_GetItem(builtins, debug_str);
    2467           3 :     Py_DECREF(debug_str);
    2468           3 :     if (!debug) goto bad;
    2469           3 :     flag = PyObject_IsTrue(debug);
    2470           3 :     Py_DECREF(debug);
    2471           3 :     if (flag == -1) goto bad;
    2472           3 :     __pyx_assertions_enabled_flag = flag;
    2473           3 :     return 0;
    2474           0 :   bad:
    2475           0 :     __pyx_assertions_enabled_flag = 1;
    2476           0 :     return -1;
    2477             :   }
    2478             : #else
    2479             :   #define __Pyx_init_assertions_enabled()  (0)
    2480             :   #define __pyx_assertions_enabled()  (!Py_OptimizeFlag)
    2481             : #endif
    2482             : 
    2483             : /* RaiseTooManyValuesToUnpack.proto */
    2484             : static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
    2485             : 
    2486             : /* RaiseNeedMoreValuesToUnpack.proto */
    2487             : static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
    2488             : 
    2489             : /* RaiseNoneIterError.proto */
    2490             : static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
    2491             : 
    2492             : /* ExtTypeTest.proto */
    2493             : static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
    2494             : 
    2495             : /* GetTopmostException.proto */
    2496             : #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
    2497             : static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
    2498             : #endif
    2499             : 
    2500             : /* SaveResetException.proto */
    2501             : #if CYTHON_FAST_THREAD_STATE
    2502             : #define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
    2503             : static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
    2504             : #define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
    2505             : static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
    2506             : #else
    2507             : #define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
    2508             : #define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
    2509             : #endif
    2510             : 
    2511             : /* GetException.proto */
    2512             : #if CYTHON_FAST_THREAD_STATE
    2513             : #define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
    2514             : static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
    2515             : #else
    2516             : static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
    2517             : #endif
    2518             : 
    2519             : /* SwapException.proto */
    2520             : #if CYTHON_FAST_THREAD_STATE
    2521             : #define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
    2522             : static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
    2523             : #else
    2524             : static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
    2525             : #endif
    2526             : 
    2527             : /* Import.proto */
    2528             : static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
    2529             : 
    2530             : /* ImportDottedModule.proto */
    2531             : static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple);
    2532             : #if PY_MAJOR_VERSION >= 3
    2533             : static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple);
    2534             : #endif
    2535             : 
    2536             : /* FastTypeChecks.proto */
    2537             : #if CYTHON_COMPILING_IN_CPYTHON
    2538             : #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
    2539             : #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
    2540             : static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
    2541             : static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
    2542             : static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
    2543             : static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
    2544             : #else
    2545             : #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
    2546             : #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
    2547             : #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
    2548             : #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
    2549             : #endif
    2550             : #define __Pyx_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
    2551             : #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
    2552             : 
    2553             : CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
    2554             : /* ListCompAppend.proto */
    2555             : #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
    2556           0 : static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    2557           0 :     PyListObject* L = (PyListObject*) list;
    2558           0 :     Py_ssize_t len = Py_SIZE(list);
    2559           0 :     if (likely(L->allocated > len)) {
    2560           0 :         Py_INCREF(x);
    2561             :         #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
    2562             :         L->ob_item[len] = x;
    2563             :         #else
    2564           0 :         PyList_SET_ITEM(list, len, x);
    2565             :         #endif
    2566           0 :         __Pyx_SET_SIZE(list, len + 1);
    2567           0 :         return 0;
    2568             :     }
    2569           0 :     return PyList_Append(list, x);
    2570             : }
    2571             : #else
    2572             : #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
    2573             : #endif
    2574             : 
    2575             : /* PySequenceMultiply.proto */
    2576             : #define __Pyx_PySequence_Multiply_Left(mul, seq)  __Pyx_PySequence_Multiply(seq, mul)
    2577             : static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul);
    2578             : 
    2579             : /* SetItemInt.proto */
    2580             : #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    2581             :     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    2582             :     __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
    2583             :     (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
    2584             :                __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
    2585             : static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
    2586             : static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
    2587             :                                                int is_list, int wraparound, int boundscheck);
    2588             : 
    2589             : /* RaiseUnboundLocalError.proto */
    2590             : static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
    2591             : 
    2592             : /* DivInt[long].proto */
    2593             : static CYTHON_INLINE long __Pyx_div_long(long, long);
    2594             : 
    2595             : /* PySequenceContains.proto */
    2596           0 : static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    2597           0 :     int result = PySequence_Contains(seq, item);
    2598           0 :     return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
    2599             : }
    2600             : 
    2601             : /* ImportFrom.proto */
    2602             : static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
    2603             : 
    2604             : /* HasAttr.proto */
    2605             : static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
    2606             : 
    2607             : /* IterFinish.proto */
    2608             : static CYTHON_INLINE int __Pyx_IterFinish(void);
    2609             : 
    2610             : /* UnpackItemEndCheck.proto */
    2611             : static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
    2612             : 
    2613             : /* PyObjectFormatAndDecref.proto */
    2614             : static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
    2615             : static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);
    2616             : 
    2617             : /* PyIntCompare.proto */
    2618             : static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
    2619             : 
    2620             : /* PyObject_GenericGetAttrNoDict.proto */
    2621             : #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
    2622             : static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
    2623             : #else
    2624             : #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
    2625             : #endif
    2626             : 
    2627             : /* PyObject_GenericGetAttr.proto */
    2628             : #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
    2629             : static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
    2630             : #else
    2631             : #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
    2632             : #endif
    2633             : 
    2634             : /* IncludeStructmemberH.proto */
    2635             : #include <structmember.h>
    2636             : 
    2637             : /* FixUpExtensionType.proto */
    2638             : #if CYTHON_USE_TYPE_SPECS
    2639             : static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
    2640             : #endif
    2641             : 
    2642             : /* PyObjectCallNoArg.proto */
    2643             : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
    2644             : 
    2645             : /* PyObjectGetMethod.proto */
    2646             : static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
    2647             : 
    2648             : /* PyObjectCallMethod0.proto */
    2649             : static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
    2650             : 
    2651             : /* ValidateBasesTuple.proto */
    2652             : #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
    2653             : static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
    2654             : #endif
    2655             : 
    2656             : /* PyType_Ready.proto */
    2657             : CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);
    2658             : 
    2659             : /* SetVTable.proto */
    2660             : static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable);
    2661             : 
    2662             : /* GetVTable.proto */
    2663             : static void* __Pyx_GetVtable(PyTypeObject *type);
    2664             : 
    2665             : /* MergeVTables.proto */
    2666             : #if !CYTHON_COMPILING_IN_LIMITED_API
    2667             : static int __Pyx_MergeVtables(PyTypeObject *type);
    2668             : #endif
    2669             : 
    2670             : /* SetupReduce.proto */
    2671             : #if !CYTHON_COMPILING_IN_LIMITED_API
    2672             : static int __Pyx_setup_reduce(PyObject* type_obj);
    2673             : #endif
    2674             : 
    2675             : /* TypeImport.proto */
    2676             : #ifndef __PYX_HAVE_RT_ImportType_proto_3_0_11
    2677             : #define __PYX_HAVE_RT_ImportType_proto_3_0_11
    2678             : #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
    2679             : #include <stdalign.h>
    2680             : #endif
    2681             : #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
    2682             : #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) alignof(s)
    2683             : #else
    2684             : #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) sizeof(void*)
    2685             : #endif
    2686             : enum __Pyx_ImportType_CheckSize_3_0_11 {
    2687             :    __Pyx_ImportType_CheckSize_Error_3_0_11 = 0,
    2688             :    __Pyx_ImportType_CheckSize_Warn_3_0_11 = 1,
    2689             :    __Pyx_ImportType_CheckSize_Ignore_3_0_11 = 2
    2690             : };
    2691             : static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size);
    2692             : #endif
    2693             : 
    2694             : /* FetchSharedCythonModule.proto */
    2695             : static PyObject *__Pyx_FetchSharedCythonABIModule(void);
    2696             : 
    2697             : /* FetchCommonType.proto */
    2698             : #if !CYTHON_USE_TYPE_SPECS
    2699             : static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
    2700             : #else
    2701             : static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
    2702             : #endif
    2703             : 
    2704             : /* PyMethodNew.proto */
    2705             : #if CYTHON_COMPILING_IN_LIMITED_API
    2706             : static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    2707             :     PyObject *typesModule=NULL, *methodType=NULL, *result=NULL;
    2708             :     CYTHON_UNUSED_VAR(typ);
    2709             :     if (!self)
    2710             :         return __Pyx_NewRef(func);
    2711             :     typesModule = PyImport_ImportModule("types");
    2712             :     if (!typesModule) return NULL;
    2713             :     methodType = PyObject_GetAttrString(typesModule, "MethodType");
    2714             :     Py_DECREF(typesModule);
    2715             :     if (!methodType) return NULL;
    2716             :     result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL);
    2717             :     Py_DECREF(methodType);
    2718             :     return result;
    2719             : }
    2720             : #elif PY_MAJOR_VERSION >= 3
    2721           0 : static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    2722           0 :     CYTHON_UNUSED_VAR(typ);
    2723           0 :     if (!self)
    2724           0 :         return __Pyx_NewRef(func);
    2725           0 :     return PyMethod_New(func, self);
    2726             : }
    2727             : #else
    2728             :     #define __Pyx_PyMethod_New PyMethod_New
    2729             : #endif
    2730             : 
    2731             : /* PyVectorcallFastCallDict.proto */
    2732             : #if CYTHON_METH_FASTCALL
    2733             : static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
    2734             : #endif
    2735             : 
    2736             : /* CythonFunctionShared.proto */
    2737             : #define __Pyx_CyFunction_USED
    2738             : #define __Pyx_CYFUNCTION_STATICMETHOD  0x01
    2739             : #define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
    2740             : #define __Pyx_CYFUNCTION_CCLASS        0x04
    2741             : #define __Pyx_CYFUNCTION_COROUTINE     0x08
    2742             : #define __Pyx_CyFunction_GetClosure(f)\
    2743             :     (((__pyx_CyFunctionObject *) (f))->func_closure)
    2744             : #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    2745             :   #define __Pyx_CyFunction_GetClassObj(f)\
    2746             :       (((__pyx_CyFunctionObject *) (f))->func_classobj)
    2747             : #else
    2748             :   #define __Pyx_CyFunction_GetClassObj(f)\
    2749             :       ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
    2750             : #endif
    2751             : #define __Pyx_CyFunction_SetClassObj(f, classobj)\
    2752             :     __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
    2753             : #define __Pyx_CyFunction_Defaults(type, f)\
    2754             :     ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
    2755             : #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    2756             :     ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
    2757             : typedef struct {
    2758             : #if CYTHON_COMPILING_IN_LIMITED_API
    2759             :     PyObject_HEAD
    2760             :     PyObject *func;
    2761             : #elif PY_VERSION_HEX < 0x030900B1
    2762             :     PyCFunctionObject func;
    2763             : #else
    2764             :     PyCMethodObject func;
    2765             : #endif
    2766             : #if CYTHON_BACKPORT_VECTORCALL
    2767             :     __pyx_vectorcallfunc func_vectorcall;
    2768             : #endif
    2769             : #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
    2770             :     PyObject *func_weakreflist;
    2771             : #endif
    2772             :     PyObject *func_dict;
    2773             :     PyObject *func_name;
    2774             :     PyObject *func_qualname;
    2775             :     PyObject *func_doc;
    2776             :     PyObject *func_globals;
    2777             :     PyObject *func_code;
    2778             :     PyObject *func_closure;
    2779             : #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    2780             :     PyObject *func_classobj;
    2781             : #endif
    2782             :     void *defaults;
    2783             :     int defaults_pyobjects;
    2784             :     size_t defaults_size;
    2785             :     int flags;
    2786             :     PyObject *defaults_tuple;
    2787             :     PyObject *defaults_kwdict;
    2788             :     PyObject *(*defaults_getter)(PyObject *);
    2789             :     PyObject *func_annotations;
    2790             :     PyObject *func_is_coroutine;
    2791             : } __pyx_CyFunctionObject;
    2792             : #undef __Pyx_CyOrPyCFunction_Check
    2793             : #define __Pyx_CyFunction_Check(obj)  __Pyx_TypeCheck(obj, __pyx_CyFunctionType)
    2794             : #define __Pyx_CyOrPyCFunction_Check(obj)  __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type)
    2795             : #define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_CyFunctionType)
    2796             : static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc);
    2797             : #undef __Pyx_IsSameCFunction
    2798             : #define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCyOrCFunction(func, cfunc)
    2799             : static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
    2800             :                                       int flags, PyObject* qualname,
    2801             :                                       PyObject *closure,
    2802             :                                       PyObject *module, PyObject *globals,
    2803             :                                       PyObject* code);
    2804             : static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
    2805             : static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
    2806             :                                                          size_t size,
    2807             :                                                          int pyobjects);
    2808             : static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
    2809             :                                                             PyObject *tuple);
    2810             : static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
    2811             :                                                              PyObject *dict);
    2812             : static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
    2813             :                                                               PyObject *dict);
    2814             : static int __pyx_CyFunction_init(PyObject *module);
    2815             : #if CYTHON_METH_FASTCALL
    2816             : static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
    2817             : static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
    2818             : static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
    2819             : static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
    2820             : #if CYTHON_BACKPORT_VECTORCALL
    2821             : #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
    2822             : #else
    2823             : #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
    2824             : #endif
    2825             : #endif
    2826             : 
    2827             : /* CythonFunction.proto */
    2828             : static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
    2829             :                                       int flags, PyObject* qualname,
    2830             :                                       PyObject *closure,
    2831             :                                       PyObject *module, PyObject *globals,
    2832             :                                       PyObject* code);
    2833             : 
    2834             : /* CLineInTraceback.proto */
    2835             : #ifdef CYTHON_CLINE_IN_TRACEBACK
    2836             : #define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
    2837             : #else
    2838             : static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
    2839             : #endif
    2840             : 
    2841             : /* CodeObjectCache.proto */
    2842             : #if !CYTHON_COMPILING_IN_LIMITED_API
    2843             : typedef struct {
    2844             :     PyCodeObject* code_object;
    2845             :     int code_line;
    2846             : } __Pyx_CodeObjectCacheEntry;
    2847             : struct __Pyx_CodeObjectCache {
    2848             :     int count;
    2849             :     int max_count;
    2850             :     __Pyx_CodeObjectCacheEntry* entries;
    2851             : };
    2852             : static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
    2853             : static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
    2854             : static PyCodeObject *__pyx_find_code_object(int code_line);
    2855             : static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
    2856             : #endif
    2857             : 
    2858             : /* AddTraceback.proto */
    2859             : static void __Pyx_AddTraceback(const char *funcname, int c_line,
    2860             :                                int py_line, const char *filename);
    2861             : 
    2862             : #if PY_MAJOR_VERSION < 3
    2863             :     static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
    2864             :     static void __Pyx_ReleaseBuffer(Py_buffer *view);
    2865             : #else
    2866             :     #define __Pyx_GetBuffer PyObject_GetBuffer
    2867             :     #define __Pyx_ReleaseBuffer PyBuffer_Release
    2868             : #endif
    2869             : 
    2870             : 
    2871             : /* BufferStructDeclare.proto */
    2872             : typedef struct {
    2873             :   Py_ssize_t shape, strides, suboffsets;
    2874             : } __Pyx_Buf_DimInfo;
    2875             : typedef struct {
    2876             :   size_t refcount;
    2877             :   Py_buffer pybuffer;
    2878             : } __Pyx_Buffer;
    2879             : typedef struct {
    2880             :   __Pyx_Buffer *rcbuffer;
    2881             :   char *data;
    2882             :   __Pyx_Buf_DimInfo diminfo[8];
    2883             : } __Pyx_LocalBuf_ND;
    2884             : 
    2885             : /* MemviewSliceIsContig.proto */
    2886             : static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
    2887             : 
    2888             : /* OverlappingSlices.proto */
    2889             : static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
    2890             :                                 __Pyx_memviewslice *slice2,
    2891             :                                 int ndim, size_t itemsize);
    2892             : 
    2893             : /* IsLittleEndian.proto */
    2894             : static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);
    2895             : 
    2896             : /* BufferFormatCheck.proto */
    2897             : static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
    2898             : static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
    2899             :                               __Pyx_BufFmt_StackElem* stack,
    2900             :                               __Pyx_TypeInfo* type);
    2901             : 
    2902             : /* TypeInfoCompare.proto */
    2903             : static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);
    2904             : 
    2905             : /* MemviewSliceValidateAndInit.proto */
    2906             : static int __Pyx_ValidateAndInit_memviewslice(
    2907             :                 int *axes_specs,
    2908             :                 int c_or_f_flag,
    2909             :                 int buf_flags,
    2910             :                 int ndim,
    2911             :                 __Pyx_TypeInfo *dtype,
    2912             :                 __Pyx_BufFmt_StackElem stack[],
    2913             :                 __Pyx_memviewslice *memviewslice,
    2914             :                 PyObject *original_obj);
    2915             : 
    2916             : /* ObjectToMemviewSlice.proto */
    2917             : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t__const__(PyObject *, int writable_flag);
    2918             : 
    2919             : /* ObjectToMemviewSlice.proto */
    2920             : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(PyObject *, int writable_flag);
    2921             : 
    2922             : /* MemviewDtypeToObject.proto */
    2923             : static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(const char *itemp);
    2924             : static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(const char *itemp, PyObject *obj);
    2925             : 
    2926             : /* ObjectToMemviewSlice.proto */
    2927             : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t(PyObject *, int writable_flag);
    2928             : 
    2929             : /* ObjectToMemviewSlice.proto */
    2930             : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_BTYPE_t(PyObject *, int writable_flag);
    2931             : 
    2932             : /* RealImag.proto */
    2933             : #if CYTHON_CCOMPLEX
    2934             :   #ifdef __cplusplus
    2935             :     #define __Pyx_CREAL(z) ((z).real())
    2936             :     #define __Pyx_CIMAG(z) ((z).imag())
    2937             :   #else
    2938             :     #define __Pyx_CREAL(z) (__real__(z))
    2939             :     #define __Pyx_CIMAG(z) (__imag__(z))
    2940             :   #endif
    2941             : #else
    2942             :     #define __Pyx_CREAL(z) ((z).real)
    2943             :     #define __Pyx_CIMAG(z) ((z).imag)
    2944             : #endif
    2945             : #if defined(__cplusplus) && CYTHON_CCOMPLEX\
    2946             :         && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
    2947             :     #define __Pyx_SET_CREAL(z,x) ((z).real(x))
    2948             :     #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
    2949             : #else
    2950             :     #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
    2951             :     #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
    2952             : #endif
    2953             : 
    2954             : /* Arithmetic.proto */
    2955             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    2956             :     #define __Pyx_c_eq_float(a, b)   ((a)==(b))
    2957             :     #define __Pyx_c_sum_float(a, b)  ((a)+(b))
    2958             :     #define __Pyx_c_diff_float(a, b) ((a)-(b))
    2959             :     #define __Pyx_c_prod_float(a, b) ((a)*(b))
    2960             :     #define __Pyx_c_quot_float(a, b) ((a)/(b))
    2961             :     #define __Pyx_c_neg_float(a)     (-(a))
    2962             :   #ifdef __cplusplus
    2963             :     #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
    2964             :     #define __Pyx_c_conj_float(z)    (::std::conj(z))
    2965             :     #if 1
    2966             :         #define __Pyx_c_abs_float(z)     (::std::abs(z))
    2967             :         #define __Pyx_c_pow_float(a, b)  (::std::pow(a, b))
    2968             :     #endif
    2969             :   #else
    2970             :     #define __Pyx_c_is_zero_float(z) ((z)==0)
    2971             :     #define __Pyx_c_conj_float(z)    (conjf(z))
    2972             :     #if 1
    2973             :         #define __Pyx_c_abs_float(z)     (cabsf(z))
    2974             :         #define __Pyx_c_pow_float(a, b)  (cpowf(a, b))
    2975             :     #endif
    2976             :  #endif
    2977             : #else
    2978             :     static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
    2979             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
    2980             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
    2981             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
    2982             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
    2983             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
    2984             :     static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
    2985             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
    2986             :     #if 1
    2987             :         static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
    2988             :         static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
    2989             :     #endif
    2990             : #endif
    2991             : 
    2992             : /* Arithmetic.proto */
    2993             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    2994             :     #define __Pyx_c_eq_double(a, b)   ((a)==(b))
    2995             :     #define __Pyx_c_sum_double(a, b)  ((a)+(b))
    2996             :     #define __Pyx_c_diff_double(a, b) ((a)-(b))
    2997             :     #define __Pyx_c_prod_double(a, b) ((a)*(b))
    2998             :     #define __Pyx_c_quot_double(a, b) ((a)/(b))
    2999             :     #define __Pyx_c_neg_double(a)     (-(a))
    3000             :   #ifdef __cplusplus
    3001             :     #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
    3002             :     #define __Pyx_c_conj_double(z)    (::std::conj(z))
    3003             :     #if 1
    3004             :         #define __Pyx_c_abs_double(z)     (::std::abs(z))
    3005             :         #define __Pyx_c_pow_double(a, b)  (::std::pow(a, b))
    3006             :     #endif
    3007             :   #else
    3008             :     #define __Pyx_c_is_zero_double(z) ((z)==0)
    3009             :     #define __Pyx_c_conj_double(z)    (conj(z))
    3010             :     #if 1
    3011             :         #define __Pyx_c_abs_double(z)     (cabs(z))
    3012             :         #define __Pyx_c_pow_double(a, b)  (cpow(a, b))
    3013             :     #endif
    3014             :  #endif
    3015             : #else
    3016             :     static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3017             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3018             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3019             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3020             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3021             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
    3022             :     static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
    3023             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
    3024             :     #if 1
    3025             :         static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
    3026             :         static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3027             :     #endif
    3028             : #endif
    3029             : 
    3030             : /* Arithmetic.proto */
    3031             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    3032             :     #define __Pyx_c_eq_long__double(a, b)   ((a)==(b))
    3033             :     #define __Pyx_c_sum_long__double(a, b)  ((a)+(b))
    3034             :     #define __Pyx_c_diff_long__double(a, b) ((a)-(b))
    3035             :     #define __Pyx_c_prod_long__double(a, b) ((a)*(b))
    3036             :     #define __Pyx_c_quot_long__double(a, b) ((a)/(b))
    3037             :     #define __Pyx_c_neg_long__double(a)     (-(a))
    3038             :   #ifdef __cplusplus
    3039             :     #define __Pyx_c_is_zero_long__double(z) ((z)==(long double)0)
    3040             :     #define __Pyx_c_conj_long__double(z)    (::std::conj(z))
    3041             :     #if 1
    3042             :         #define __Pyx_c_abs_long__double(z)     (::std::abs(z))
    3043             :         #define __Pyx_c_pow_long__double(a, b)  (::std::pow(a, b))
    3044             :     #endif
    3045             :   #else
    3046             :     #define __Pyx_c_is_zero_long__double(z) ((z)==0)
    3047             :     #define __Pyx_c_conj_long__double(z)    (conjl(z))
    3048             :     #if 1
    3049             :         #define __Pyx_c_abs_long__double(z)     (cabsl(z))
    3050             :         #define __Pyx_c_pow_long__double(a, b)  (cpowl(a, b))
    3051             :     #endif
    3052             :  #endif
    3053             : #else
    3054             :     static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    3055             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    3056             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    3057             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    3058             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    3059             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex);
    3060             :     static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex);
    3061             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex);
    3062             :     #if 1
    3063             :         static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex);
    3064             :         static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    3065             :     #endif
    3066             : #endif
    3067             : 
    3068             : /* MemviewSliceCopyTemplate.proto */
    3069             : static __Pyx_memviewslice
    3070             : __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
    3071             :                                  const char *mode, int ndim,
    3072             :                                  size_t sizeof_dtype, int contig_flag,
    3073             :                                  int dtype_is_object);
    3074             : 
    3075             : /* MemviewSliceInit.proto */
    3076             : #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
    3077             : #define __Pyx_MEMVIEW_DIRECT   1
    3078             : #define __Pyx_MEMVIEW_PTR      2
    3079             : #define __Pyx_MEMVIEW_FULL     4
    3080             : #define __Pyx_MEMVIEW_CONTIG   8
    3081             : #define __Pyx_MEMVIEW_STRIDED  16
    3082             : #define __Pyx_MEMVIEW_FOLLOW   32
    3083             : #define __Pyx_IS_C_CONTIG 1
    3084             : #define __Pyx_IS_F_CONTIG 2
    3085             : static int __Pyx_init_memviewslice(
    3086             :                 struct __pyx_memoryview_obj *memview,
    3087             :                 int ndim,
    3088             :                 __Pyx_memviewslice *memviewslice,
    3089             :                 int memview_is_new_reference);
    3090             : static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
    3091             :     __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock);
    3092             : static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
    3093             :     __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock);
    3094             : #define __pyx_get_slice_count_pointer(memview) (&memview->acquisition_count)
    3095             : #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
    3096             : #define __PYX_XCLEAR_MEMVIEW(slice, have_gil) __Pyx_XCLEAR_MEMVIEW(slice, have_gil, __LINE__)
    3097             : static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
    3098             : static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *, int, int);
    3099             : 
    3100             : /* CIntFromPy.proto */
    3101             : static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *);
    3102             : 
    3103             : /* CIntToPy.proto */
    3104             : static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value);
    3105             : 
    3106             : /* CIntToPy.proto */
    3107             : static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
    3108             : 
    3109             : /* CIntFromPy.proto */
    3110             : static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
    3111             : 
    3112             : /* CIntFromPy.proto */
    3113             : static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
    3114             : 
    3115             : /* CIntToPy.proto */
    3116             : static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
    3117             : 
    3118             : /* CIntFromPy.proto */
    3119             : static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
    3120             : 
    3121             : /* FormatTypeName.proto */
    3122             : #if CYTHON_COMPILING_IN_LIMITED_API
    3123             : typedef PyObject *__Pyx_TypeName;
    3124             : #define __Pyx_FMT_TYPENAME "%U"
    3125             : static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
    3126             : #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
    3127             : #else
    3128             : typedef const char *__Pyx_TypeName;
    3129             : #define __Pyx_FMT_TYPENAME "%.200s"
    3130             : #define __Pyx_PyType_GetName(tp) ((tp)->tp_name)
    3131             : #define __Pyx_DECREF_TypeName(obj)
    3132             : #endif
    3133             : 
    3134             : /* CheckBinaryVersion.proto */
    3135             : static unsigned long __Pyx_get_runtime_version(void);
    3136             : static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);
    3137             : 
    3138             : /* InitStrings.proto */
    3139             : static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
    3140             : 
    3141             : /* #### Code section: module_declarations ### */
    3142             : static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
    3143             : static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
    3144             : static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
    3145             : static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
    3146             : static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
    3147             : static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
    3148             : static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
    3149             : static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
    3150             : static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self); /* proto*/
    3151             : static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
    3152             : static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
    3153             : static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto*/
    3154             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self); /* proto*/
    3155             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self); /* proto*/
    3156             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr *__pyx_v_self); /* proto*/
    3157             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr *__pyx_v_self); /* proto*/
    3158             : static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self); /* proto*/
    3159             : static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self); /* proto*/
    3160             : static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
    3161             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
    3162             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
    3163             : static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
    3164             : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
    3165             : static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
    3166             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self); /* proto*/
    3167             : static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self); /* proto*/
    3168             : static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self); /* proto*/
    3169             : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self); /* proto*/
    3170             : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self); /* proto*/
    3171             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self); /* proto*/
    3172             : static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self); /* proto*/
    3173             : 
    3174             : /* Module declarations from "cython.view" */
    3175             : 
    3176             : /* Module declarations from "cython.dataclasses" */
    3177             : 
    3178             : /* Module declarations from "cython" */
    3179             : 
    3180             : /* Module declarations from "libc.string" */
    3181             : 
    3182             : /* Module declarations from "libc.stdio" */
    3183             : 
    3184             : /* Module declarations from "__builtin__" */
    3185             : 
    3186             : /* Module declarations from "cpython.type" */
    3187             : 
    3188             : /* Module declarations from "cpython" */
    3189             : 
    3190             : /* Module declarations from "cpython.object" */
    3191             : 
    3192             : /* Module declarations from "cpython.ref" */
    3193             : 
    3194             : /* Module declarations from "numpy" */
    3195             : 
    3196             : /* Module declarations from "numpy" */
    3197             : static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/
    3198             : 
    3199             : /* Module declarations from "libc.math" */
    3200             : 
    3201             : /* Module declarations from "scipy.sparse.csgraph._matching" */
    3202             : static PyObject *__pyx_collections_abc_Sequence = 0;
    3203             : static PyObject *generic = 0;
    3204             : static PyObject *strided = 0;
    3205             : static PyObject *indirect = 0;
    3206             : static PyObject *contiguous = 0;
    3207             : static PyObject *indirect_contiguous = 0;
    3208             : static int __pyx_memoryview_thread_locks_used;
    3209             : static PyThread_type_lock __pyx_memoryview_thread_locks[8];
    3210             : static PyObject *__pyx_f_5scipy_6sparse_7csgraph_9_matching__hopcroft_karp(__Pyx_memviewslice, __Pyx_memviewslice, __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t const , __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t const ); /*proto*/
    3211             : static __Pyx_memviewslice __pyx_f_5scipy_6sparse_7csgraph_9_matching__lapjvsp(__Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t const , __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t const ); /*proto*/
    3212             : static __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_f_5scipy_6sparse_7csgraph_9_matching__lapjvsp_single_l(__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t, __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t); /*proto*/
    3213             : static PyObject *__pyx_f_5scipy_6sparse_7csgraph_9_matching__lapjvsp_update_dual(__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t, __pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t); /*proto*/
    3214             : static PyObject *__pyx_f_5scipy_6sparse_7csgraph_9_matching__lapjvsp_update_assignments(__Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t, __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t); /*proto*/
    3215             : static int __pyx_array_allocate_buffer(struct __pyx_array_obj *); /*proto*/
    3216             : static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
    3217             : static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
    3218             : static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
    3219             : static PyObject *_unellipsify(PyObject *, int); /*proto*/
    3220             : static int assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
    3221             : static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
    3222             : static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/
    3223             : static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
    3224             : static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
    3225             : static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
    3226             : static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
    3227             : static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
    3228             : static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
    3229             : static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
    3230             : static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
    3231             : static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
    3232             : static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
    3233             : static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
    3234             : static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
    3235             : static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
    3236             : static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
    3237             : static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
    3238             : static int __pyx_memoryview_err_dim(PyObject *, PyObject *, int); /*proto*/
    3239             : static int __pyx_memoryview_err(PyObject *, PyObject *); /*proto*/
    3240             : static int __pyx_memoryview_err_no_memory(void); /*proto*/
    3241             : static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
    3242             : static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
    3243             : static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
    3244             : static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
    3245             : static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
    3246             : static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
    3247             : static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
    3248             : static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
    3249             : /* #### Code section: typeinfo ### */
    3250             : static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t__const__ = { "const ITYPE_t", NULL, sizeof(__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t const ), { 0 }, 0, __PYX_IS_UNSIGNED(__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t const ) ? 'U' : 'I', __PYX_IS_UNSIGNED(__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t const ), 0 };
    3251             : static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t = { "ITYPE_t", NULL, sizeof(__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t), { 0 }, 0, __PYX_IS_UNSIGNED(__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t) ? 'U' : 'I', __PYX_IS_UNSIGNED(__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t), 0 };
    3252             : static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t = { "DTYPE_t", NULL, sizeof(__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t), { 0 }, 0, 'R', 0, 0 };
    3253             : static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_BTYPE_t = { "BTYPE_t", NULL, sizeof(__pyx_t_5scipy_6sparse_7csgraph_9_matching_BTYPE_t), { 0 }, 0, __PYX_IS_UNSIGNED(__pyx_t_5scipy_6sparse_7csgraph_9_matching_BTYPE_t) ? 'U' : 'I', __PYX_IS_UNSIGNED(__pyx_t_5scipy_6sparse_7csgraph_9_matching_BTYPE_t), 0 };
    3254             : /* #### Code section: before_global_var ### */
    3255             : #define __Pyx_MODULE_NAME "scipy.sparse.csgraph._matching"
    3256             : extern int __pyx_module_is_main_scipy__sparse__csgraph___matching;
    3257             : int __pyx_module_is_main_scipy__sparse__csgraph___matching = 0;
    3258             : 
    3259             : /* Implementation of "scipy.sparse.csgraph._matching" */
    3260             : /* #### Code section: global_var ### */
    3261             : static PyObject *__pyx_builtin_TypeError;
    3262             : static PyObject *__pyx_builtin_range;
    3263             : static PyObject *__pyx_builtin_ValueError;
    3264             : static PyObject *__pyx_builtin___import__;
    3265             : static PyObject *__pyx_builtin_MemoryError;
    3266             : static PyObject *__pyx_builtin_enumerate;
    3267             : static PyObject *__pyx_builtin_AssertionError;
    3268             : static PyObject *__pyx_builtin_Ellipsis;
    3269             : static PyObject *__pyx_builtin_id;
    3270             : static PyObject *__pyx_builtin_IndexError;
    3271             : static PyObject *__pyx_builtin_ImportError;
    3272             : /* #### Code section: string_decls ### */
    3273             : static const char __pyx_k_[] = ": ";
    3274             : static const char __pyx_k_O[] = "O";
    3275             : static const char __pyx_k_T[] = "T";
    3276             : static const char __pyx_k_a[] = "a";
    3277             : static const char __pyx_k_b[] = "b";
    3278             : static const char __pyx_k_c[] = "c";
    3279             : static const char __pyx_k_i[] = "i";
    3280             : static const char __pyx_k_j[] = "j";
    3281             : static const char __pyx_k_x[] = "x";
    3282             : static const char __pyx_k_y[] = "y";
    3283             : static const char __pyx_k__2[] = ".";
    3284             : static const char __pyx_k__3[] = "*";
    3285             : static const char __pyx_k__6[] = "'";
    3286             : static const char __pyx_k__7[] = ")";
    3287             : static const char __pyx_k_gc[] = "gc";
    3288             : static const char __pyx_k_id[] = "id";
    3289             : static const char __pyx_k_np[] = "np";
    3290             : static const char __pyx_k__28[] = "_";
    3291             : static const char __pyx_k__32[] = "?";
    3292             : static const char __pyx_k_abc[] = "abc";
    3293             : static const char __pyx_k_all[] = "all";
    3294             : static const char __pyx_k_and[] = " and ";
    3295             : static const char __pyx_k_coo[] = "coo";
    3296             : static const char __pyx_k_csc[] = "csc";
    3297             : static const char __pyx_k_csr[] = "csr";
    3298             : static const char __pyx_k_got[] = " (got ";
    3299             : static const char __pyx_k_max[] = "max";
    3300             : static const char __pyx_k_min[] = "min";
    3301             : static const char __pyx_k_new[] = "__new__";
    3302             : static const char __pyx_k_obj[] = "obj";
    3303             : static const char __pyx_k_row[] = "row";
    3304             : static const char __pyx_k_sum[] = "sum";
    3305             : static const char __pyx_k_sys[] = "sys";
    3306             : static const char __pyx_k_base[] = "base";
    3307             : static const char __pyx_k_bool[] = "bool_";
    3308             : static const char __pyx_k_data[] = "data";
    3309             : static const char __pyx_k_dict[] = "__dict__";
    3310             : static const char __pyx_k_main[] = "__main__";
    3311             : static const char __pyx_k_mode[] = "mode";
    3312             : static const char __pyx_k_name[] = "name";
    3313             : static const char __pyx_k_ndim[] = "ndim";
    3314             : static const char __pyx_k_pack[] = "pack";
    3315             : static const char __pyx_k_size[] = "size";
    3316             : static const char __pyx_k_spec[] = "__spec__";
    3317             : static const char __pyx_k_step[] = "step";
    3318             : static const char __pyx_k_stop[] = "stop";
    3319             : static const char __pyx_k_test[] = "__test__";
    3320             : static const char __pyx_k_warn[] = "warn";
    3321             : static const char __pyx_k_ASCII[] = "ASCII";
    3322             : static const char __pyx_k_BTYPE[] = "BTYPE";
    3323             : static const char __pyx_k_DTYPE[] = "DTYPE";
    3324             : static const char __pyx_k_ITYPE[] = "ITYPE";
    3325             : static const char __pyx_k_class[] = "__class__";
    3326             : static const char __pyx_k_count[] = "count";
    3327             : static const char __pyx_k_dtype[] = "dtype";
    3328             : static const char __pyx_k_empty[] = "empty";
    3329             : static const char __pyx_k_error[] = "error";
    3330             : static const char __pyx_k_flags[] = "flags";
    3331             : static const char __pyx_k_got_2[] = "got ";
    3332             : static const char __pyx_k_graph[] = "graph";
    3333             : static const char __pyx_k_iinfo[] = "iinfo";
    3334             : static const char __pyx_k_index[] = "index";
    3335             : static const char __pyx_k_int32[] = "int32";
    3336             : static const char __pyx_k_numpy[] = "numpy";
    3337             : static const char __pyx_k_range[] = "range";
    3338             : static const char __pyx_k_shape[] = "shape";
    3339             : static const char __pyx_k_start[] = "start";
    3340             : static const char __pyx_k_tocsr[] = "tocsr";
    3341             : static const char __pyx_k_tools[] = "_tools";
    3342             : static const char __pyx_k_uint8[] = "uint8";
    3343             : static const char __pyx_k_zeros[] = "zeros";
    3344             : static const char __pyx_k_arange[] = "arange";
    3345             : static const char __pyx_k_astype[] = "astype";
    3346             : static const char __pyx_k_column[] = "column";
    3347             : static const char __pyx_k_double[] = "double";
    3348             : static const char __pyx_k_enable[] = "enable";
    3349             : static const char __pyx_k_encode[] = "encode";
    3350             : static const char __pyx_k_format[] = "format";
    3351             : static const char __pyx_k_import[] = "__import__";
    3352             : static const char __pyx_k_indptr[] = "indptr";
    3353             : static const char __pyx_k_name_2[] = "__name__";
    3354             : static const char __pyx_k_pickle[] = "pickle";
    3355             : static const char __pyx_k_reduce[] = "__reduce__";
    3356             : static const char __pyx_k_struct[] = "struct";
    3357             : static const char __pyx_k_unpack[] = "unpack";
    3358             : static const char __pyx_k_update[] = "update";
    3359             : static const char __pyx_k_argsort[] = "argsort";
    3360             : static const char __pyx_k_asarray[] = "asarray";
    3361             : static const char __pyx_k_disable[] = "disable";
    3362             : static const char __pyx_k_float64[] = "float64";
    3363             : static const char __pyx_k_fortran[] = "fortran";
    3364             : static const char __pyx_k_indices[] = "indices";
    3365             : static const char __pyx_k_memview[] = "memview";
    3366             : static const char __pyx_k_Ellipsis[] = "Ellipsis";
    3367             : static const char __pyx_k_Sequence[] = "Sequence";
    3368             : static const char __pyx_k_getstate[] = "__getstate__";
    3369             : static const char __pyx_k_isposinf[] = "isposinf";
    3370             : static const char __pyx_k_issparse[] = "issparse";
    3371             : static const char __pyx_k_itemsize[] = "itemsize";
    3372             : static const char __pyx_k_matching[] = "matching";
    3373             : static const char __pyx_k_maximize[] = "maximize";
    3374             : static const char __pyx_k_pyx_type[] = "__pyx_type";
    3375             : static const char __pyx_k_register[] = "register";
    3376             : static const char __pyx_k_setstate[] = "__setstate__";
    3377             : static const char __pyx_k_warnings[] = "warnings";
    3378             : static const char __pyx_k_TypeError[] = "TypeError";
    3379             : static const char __pyx_k_csr_array[] = "csr_array";
    3380             : static const char __pyx_k_enumerate[] = "enumerate";
    3381             : static const char __pyx_k_isenabled[] = "isenabled";
    3382             : static const char __pyx_k_perm_type[] = "perm_type";
    3383             : static const char __pyx_k_pyx_state[] = "__pyx_state";
    3384             : static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
    3385             : static const char __pyx_k_IndexError[] = "IndexError";
    3386             : static const char __pyx_k_ValueError[] = "ValueError";
    3387             : static const char __pyx_k_issubdtype[] = "issubdtype";
    3388             : static const char __pyx_k_pyx_result[] = "__pyx_result";
    3389             : static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
    3390             : static const char __pyx_k_ImportError[] = "ImportError";
    3391             : static const char __pyx_k_MemoryError[] = "MemoryError";
    3392             : static const char __pyx_k_PickleError[] = "PickleError";
    3393             : static const char __pyx_k_biadjacency[] = "biadjacency";
    3394             : static const char __pyx_k_collections[] = "collections";
    3395             : static const char __pyx_k_biadj_indptr[] = "biadj_indptr";
    3396             : static const char __pyx_k_initializing[] = "_initializing";
    3397             : static const char __pyx_k_is_coroutine[] = "_is_coroutine";
    3398             : static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
    3399             : static const char __pyx_k_scipy_sparse[] = "scipy.sparse";
    3400             : static const char __pyx_k_stringsource[] = "<stringsource>";
    3401             : static const char __pyx_k_version_info[] = "version_info";
    3402             : static const char __pyx_k_biadj_indices[] = "biadj_indices";
    3403             : static const char __pyx_k_biadjacency_t[] = "biadjacency_t";
    3404             : static const char __pyx_k_class_getitem[] = "__class_getitem__";
    3405             : static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
    3406             : static const char __pyx_k_AssertionError[] = "AssertionError";
    3407             : static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
    3408             : static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
    3409             : static const char __pyx_k_collections_abc[] = "collections.abc";
    3410             : static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
    3411             : static const char __pyx_k_eliminate_zeros[] = "eliminate_zeros";
    3412             : static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
    3413             : static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
    3414             : static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
    3415             : static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
    3416             : static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
    3417             : static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
    3418             : static const char __pyx_k_graph_must_be_sparse[] = "graph must be sparse";
    3419             : static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
    3420             : static const char __pyx_k_Invalid_shape_in_axis[] = "Invalid shape in axis ";
    3421             : static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
    3422             : static const char __pyx_k_safe_downcast_indices[] = "_safe_downcast_indices";
    3423             : static const char __pyx_k_scipy_sparse__sputils[] = "scipy.sparse._sputils";
    3424             : static const char __pyx_k_Cannot_index_with_type[] = "Cannot index with type '";
    3425             : static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
    3426             : static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
    3427             : static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
    3428             : static const char __pyx_k_no_full_matching_exists[] = "no full matching exists";
    3429             : static const char __pyx_k_Dimension_d_is_not_direct[] = "Dimension %d is not direct";
    3430             : static const char __pyx_k_Index_out_of_bounds_axis_d[] = "Index out of bounds (axis %d)";
    3431             : static const char __pyx_k_maximum_bipartite_matching[] = "maximum_bipartite_matching";
    3432             : static const char __pyx_k_Step_may_not_be_zero_axis_d[] = "Step may not be zero (axis %d)";
    3433             : static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
    3434             : static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
    3435             : static const char __pyx_k_convert_pydata_sparse_to_scipy[] = "convert_pydata_sparse_to_scipy";
    3436             : static const char __pyx_k_scipy_sparse_csgraph__matching[] = "scipy.sparse.csgraph._matching";
    3437             : static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
    3438             : static const char __pyx_k_graph_must_be_in_CSC_CSR_or_COO[] = "graph must be in CSC, CSR, or COO format.";
    3439             : static const char __pyx_k_home_czgdp18079_Quansight_scipy[] = "/home/czgdp18079/Quansight/scipy/scipy/sparse/csgraph/_matching.pyx";
    3440             : static const char __pyx_k_maximum_bipartite_matching_grap[] = "\n    maximum_bipartite_matching(graph, perm_type='row')\n\n    Returns a matching of a bipartite graph whose cardinality is at least that\n    of any given matching of the graph.\n\n    Parameters\n    ----------\n    graph : sparse array or matrix\n        Input sparse in CSR format whose rows represent one partition of the\n        graph and whose columns represent the other partition. An edge between\n        two vertices is indicated by the corresponding entry in the matrix\n        existing in its sparse representation.\n    perm_type : str, {'row', 'column'}\n        Which partition to return the matching in terms of: If ``'row'``, the\n        function produces an array whose length is the number of columns in the\n        input, and whose :math:`j`'th element is the row matched to the\n        :math:`j`'th column. Conversely, if ``perm_type`` is ``'column'``, this\n        returns the columns matched to each row.\n\n    Returns\n    -------\n    perm : ndarray\n        A matching of the vertices in one of the two partitions. Unmatched\n        vertices are represented by a ``-1`` in the result.\n\n    Notes\n    -----\n    This function implements the Hopcroft--Karp algorithm [1]_. Its time\n    complexity is :math:`O(\\lvert E \\rvert \\sqrt{\\lvert V \\rvert})`, and its\n    space complexity is linear in the number of rows. In practice, this\n    asymmetry between rows and columns means that it can be more efficient to\n    transpose the input if it contains more columns than rows.\n\n    By Konig's theorem, the cardinality of the matching is also the number of\n    vertices appearing in a minimum vertex cover of the graph.\n\n    Note that if the sparse representation contains explicit zeros, these are\n    still counted as edges.\n\n    The implementation was changed in SciPy 1.4.0 to allow matching of general\n    bipartite graphs, where previous versions would assume that a perfect\n    matching existed. As such, code written against 1.4.0 will not ne""cessarily\n    work on older versions.\n\n    If multiple valid solutions are possible, output may vary with SciPy and\n    Python version.\n\n    References\n    ----------\n    .. [1] John E. Hopcroft and Richard M. Karp. \"An n^{5 / 2} Algorithm for\n           Maximum Matchings in Bipartite Graphs\" In: SIAM Journal of Computing\n           2.4 (1973), pp. 225--231. :doi:`10.1137/0202019`\n\n    Examples\n    --------\n    >>> from scipy.sparse import csr_array\n    >>> from scipy.sparse.csgraph import maximum_bipartite_matching\n\n    As a simple example, consider a bipartite graph in which the partitions\n    contain 2 and 3 elements respectively. Suppose that one partition contains\n    vertices labelled 0 and 1, and that the other partition contains vertices\n    labelled A, B, and C. Suppose that there are edges connecting 0 and C,\n    1 and A, and 1 and B. This graph would then be represented by the following\n    sparse array:\n\n    >>> graph = csr_array([[0, 0, 1], [1, 1, 0]])\n\n    Here, the 1s could be anything, as long as they end up being stored as\n    elements in the sparse array. We can now calculate maximum matchings as\n    follows:\n\n    >>> print(maximum_bipartite_matching(graph, perm_type='column'))\n    [2 0]\n    >>> print(maximum_bipartite_matching(graph, perm_type='row'))\n    [ 1 -1  0]\n\n    The first output tells us that 1 and 2 are matched with C and A\n    respectively, and the second output tells us that A, B, and C are matched\n    with 1, nothing, and 0 respectively.\n\n    Note that explicit zeros are still converted to edges. This means that a\n    different way to represent the above graph is by using the CSR structure\n    directly as follows:\n\n    >>> data = [0, 0, 0]\n    >>> indices = [2, 0, 1]\n    >>> indptr = [0, 1, 3]\n    >>> graph = csr_array((data, indices, indptr))\n    >>> print(maximum_bipartite_matching(graph, perm_type='column'))\n    [2 0]\n    >>> print(maximum_bipartite_matching(graph, perm_type='row')"")\n    [ 1 -1  0]\n\n    When one or both of the partitions are empty, the matching is empty as\n    well:\n\n    >>> graph = csr_array((2, 0))\n    >>> print(maximum_bipartite_matching(graph, perm_type='column'))\n    [-1 -1]\n    >>> print(maximum_bipartite_matching(graph, perm_type='row'))\n    []\n\n    When the input array is square, and the graph is known to admit a perfect\n    matching, i.e. a matching with the property that every vertex in the graph\n    belongs to some edge in the matching, then one can view the output as the\n    permutation of rows (or columns) turning the input array into one with the\n    property that all diagonal elements are non-empty:\n\n    >>> a = [[0, 1, 2, 0], [1, 0, 0, 1], [2, 0, 0, 3], [0, 1, 3, 0]]\n    >>> graph = csr_array(a)\n    >>> perm = maximum_bipartite_matching(graph, perm_type='row')\n    >>> print(graph[perm].toarray())\n    [[1 0 0 1]\n     [0 1 2 0]\n     [0 1 3 0]\n     [2 0 0 3]]\n\n    ";
    3441             : static const char __pyx_k_maximum_bipartite_matching_line[] = "maximum_bipartite_matching (line 18)";
    3442             : static const char __pyx_k_min_weight_full_bipartite_match[] = "\n    min_weight_full_bipartite_matching(biadjacency, maximize=False)\n\n    Returns the minimum weight full matching of a bipartite graph.\n\n    .. versionadded:: 1.6.0\n\n    Parameters\n    ----------\n    biadjacency : sparse array or matrix\n        Biadjacency matrix of the bipartite graph: A sparse array in CSR, CSC,\n        or COO format whose rows represent one partition of the graph and whose\n        columns represent the other partition. An edge between two vertices is\n        indicated by the corresponding entry in the matrix, and the weight of\n        the edge is given by the value of that entry. This should not be\n        confused with the full adjacency matrix of the graph, as we only need\n        the submatrix defining the bipartite structure.\n\n    maximize : bool (default: False)\n        Calculates a maximum weight matching if true.\n\n    Returns\n    -------\n    row_ind, col_ind : array\n        An array of row indices and one of corresponding column indices giving\n        the optimal matching. The total weight of the matching can be computed\n        as ``graph[row_ind, col_ind].sum()``. The row indices will be\n        sorted; in the case of a square matrix they will be equal to\n        ``numpy.arange(graph.shape[0])``.\n\n    Notes\n    -----\n\n    Let :math:`G = ((U, V), E)` be a weighted bipartite graph with non-zero\n    weights :math:`w : E \\to \\mathbb{R} \\setminus \\{0\\}`. This function then\n    produces a matching :math:`M \\subseteq E` with cardinality\n\n    .. math::\n       \\lvert M \\rvert = \\min(\\lvert U \\rvert, \\lvert V \\rvert),\n\n    which minimizes the sum of the weights of the edges included in the\n    matching, :math:`\\sum_{e \\in M} w(e)`, or raises an error if no such\n    matching exists.\n\n    When :math:`\\lvert U \\rvert = \\lvert V \\rvert`, this is commonly\n    referred to as a perfect matching; here, since we allow\n    :math:`\\lvert U \\rvert` and :math:`\\lvert V \\rvert` to differ, we""\n    follow Karp [1]_ and refer to the matching as *full*.\n\n    This function implements the LAPJVsp algorithm [2]_, short for \"Linear\n    assignment problem, Jonker--Volgenant, sparse\".\n\n    The problem it solves is equivalent to the rectangular linear assignment\n    problem. [3]_ As such, this function can be used to solve the same problems\n    as :func:`scipy.optimize.linear_sum_assignment`. That function may perform\n    better when the input is dense, or for certain particular types of inputs,\n    such as those for which the :math:`(i, j)`'th entry is the distance between\n    two points in Euclidean space.\n\n    If no full matching exists, this function raises a ``ValueError``. For\n    determining the size of the largest matching in the graph, see\n    :func:`maximum_bipartite_matching`.\n\n    We require that weights are non-zero only to avoid issues with the handling\n    of explicit zeros when converting between different sparse representations.\n    Zero weights can be handled by adding a constant to all weights, so that\n    the resulting matrix contains no zeros.\n\n    If multiple valid solutions are possible, output may vary with SciPy and\n    Python version.\n\n    References\n    ----------\n    .. [1] Richard Manning Karp:\n       An algorithm to Solve the m x n Assignment Problem in Expected Time\n       O(mn log n).\n       Networks, 10(2):143-152, 1980.\n    .. [2] Roy Jonker and Anton Volgenant:\n       A Shortest Augmenting Path Algorithm for Dense and Sparse Linear\n       Assignment Problems.\n       Computing 38:325-340, 1987.\n    .. [3] https://en.wikipedia.org/wiki/Assignment_problem\n\n    Examples\n    --------\n    >>> from scipy.sparse import csr_array\n    >>> from scipy.sparse.csgraph import min_weight_full_bipartite_matching\n\n    Let us first consider an example in which all weights are equal:\n\n    >>> biadjacency = csr_array([[1, 1, 1], [1, 0, 0], [0, 1, 0]])\n\n    Here, all we get is a perfect matching of the g""raph:\n\n    >>> print(min_weight_full_bipartite_matching(biadjacency)[1])\n    [2 0 1]\n\n    That is, the first, second, and third rows are matched with the third,\n    first, and second column respectively. Note that in this example, the 0\n    in the input matrix does *not* correspond to an edge with weight 0, but\n    rather a pair of vertices not paired by an edge.\n\n    Note also that in this case, the output matches the result of applying\n    :func:`maximum_bipartite_matching`:\n\n    >>> from scipy.sparse.csgraph import maximum_bipartite_matching\n    >>> biadjacency = csr_array([[1, 1, 1], [1, 0, 0], [0, 1, 0]])\n    >>> print(maximum_bipartite_matching(biadjacency, perm_type='column'))\n    [2 0 1]\n\n    When multiple edges are available, the ones with lowest weights are\n    preferred:\n\n    >>> biadjacency = csr_array([[3, 3, 6], [4, 3, 5], [10, 1, 8]])\n    >>> row_ind, col_ind = min_weight_full_bipartite_matching(biadjacency)\n    >>> print(col_ind)\n    [0 2 1]\n\n    The total weight in this case is :math:`3 + 5 + 1 = 9`:\n\n    >>> print(biadjacency[row_ind, col_ind].sum())\n    9\n\n    When the matrix is not square, i.e. when the two partitions have different\n    cardinalities, the matching is as large as the smaller of the two\n    partitions:\n\n    >>> biadjacency = csr_array([[0, 1, 1], [0, 2, 3]])\n    >>> row_ind, col_ind = min_weight_full_bipartite_matching(biadjacency)\n    >>> print(row_ind, col_ind)\n    [0 1] [2 1]\n    >>> biadjacency = csr_array([[0, 1], [3, 1], [1, 4]])\n    >>> row_ind, col_ind = min_weight_full_bipartite_matching(biadjacency)\n    >>> print(row_ind, col_ind)\n    [0 2] [1 0]\n\n    When one or both of the partitions are empty, the matching is empty as\n    well:\n\n    >>> biadjacency = csr_array((2, 0))\n    >>> row_ind, col_ind = min_weight_full_bipartite_matching(biadjacency)\n    >>> print(row_ind, col_ind)\n    [] []\n\n    In general, we will always reach the same sum of weights as if we had used\n    :""func:`scipy.optimize.linear_sum_assignment` but note that for that one,\n    missing edges are represented by a array entry of ``float('inf')``. Let us\n    generate a random sparse array with integer entries between 1 and 10:\n\n    >>> import numpy as np\n    >>> from scipy.sparse import random_array\n    >>> from scipy.optimize import linear_sum_assignment\n    >>> sparse = random_array((10, 10), random_state=42, density=.5, format='coo') * 10\n    >>> sparse.data = np.ceil(sparse.data)\n    >>> dense = sparse.toarray()\n    >>> dense = np.full(sparse.shape, np.inf)\n    >>> dense[sparse.row, sparse.col] = sparse.data\n    >>> sparse = sparse.tocsr()\n    >>> row_ind, col_ind = linear_sum_assignment(dense)\n    >>> print(dense[row_ind, col_ind].sum())\n    28.0\n    >>> row_ind, col_ind = min_weight_full_bipartite_matching(sparse)\n    >>> print(sparse[row_ind, col_ind].sum())\n    28.0\n\n    ";
    3443             : static const char __pyx_k_All_dimensions_preceding_dimensi[] = "All dimensions preceding dimension %d must be indexed and not sliced";
    3444             : static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
    3445             : static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
    3446             : static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
    3447             : static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
    3448             : static const char __pyx_k_Cannot_transpose_memoryview_with[] = "Cannot transpose memoryview with indirect dimensions";
    3449             : static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
    3450             : static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))";
    3451             : static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
    3452             : static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got ";
    3453             : static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis ";
    3454             : static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
    3455             : static const char __pyx_k_expected_a_matrix_containing_num[] = "expected a matrix containing numerical entries, ";
    3456             : static const char __pyx_k_explicit_zero_weights_are_remove[] = "explicit zero weights are removed before matching";
    3457             : static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension ";
    3458             : static const char __pyx_k_min_weight_full_bipartite_matchi[] = "min_weight_full_bipartite_matching";
    3459             : static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
    3460             : static const char __pyx_k_numpy__core_multiarray_failed_to[] = "numpy._core.multiarray failed to import";
    3461             : static const char __pyx_k_numpy__core_umath_failed_to_impo[] = "numpy._core.umath failed to import";
    3462             : static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
    3463             : static const char __pyx_k_min_weight_full_bipartite_matchi_2[] = "min_weight_full_bipartite_matching (line 290)";
    3464             : /* #### Code section: decls ### */
    3465             : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
    3466             : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
    3467             : static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
    3468             : static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
    3469             : static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
    3470             : static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
    3471             : static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
    3472             : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
    3473             : static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
    3474             : static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
    3475             : static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
    3476             : static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
    3477             : static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
    3478             : static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
    3479             : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
    3480             : static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3481             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
    3482             : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
    3483             : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
    3484             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3485             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3486             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3487             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3488             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3489             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3490             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3491             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3492             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3493             : static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3494             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3495             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3496             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3497             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3498             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3499             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3500             : static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3501             : static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
    3502             : static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
    3503             : static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
    3504             : static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
    3505             : static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
    3506             : static PyObject *__pyx_pf_5scipy_6sparse_7csgraph_9_matching_maximum_bipartite_matching(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_graph, PyObject *__pyx_v_perm_type); /* proto */
    3507             : static PyObject *__pyx_pf_5scipy_6sparse_7csgraph_9_matching_2min_weight_full_bipartite_matching(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_biadjacency, PyObject *__pyx_v_maximize); /* proto */
    3508             : static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
    3509             : static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
    3510             : static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
    3511             : static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
    3512             : /* #### Code section: late_includes ### */
    3513             : /* #### Code section: module_state ### */
    3514             : typedef struct {
    3515             :   PyObject *__pyx_d;
    3516             :   PyObject *__pyx_b;
    3517             :   PyObject *__pyx_cython_runtime;
    3518             :   PyObject *__pyx_empty_tuple;
    3519             :   PyObject *__pyx_empty_bytes;
    3520             :   PyObject *__pyx_empty_unicode;
    3521             :   #ifdef __Pyx_CyFunction_USED
    3522             :   PyTypeObject *__pyx_CyFunctionType;
    3523             :   #endif
    3524             :   #ifdef __Pyx_FusedFunction_USED
    3525             :   PyTypeObject *__pyx_FusedFunctionType;
    3526             :   #endif
    3527             :   #ifdef __Pyx_Generator_USED
    3528             :   PyTypeObject *__pyx_GeneratorType;
    3529             :   #endif
    3530             :   #ifdef __Pyx_IterableCoroutine_USED
    3531             :   PyTypeObject *__pyx_IterableCoroutineType;
    3532             :   #endif
    3533             :   #ifdef __Pyx_Coroutine_USED
    3534             :   PyTypeObject *__pyx_CoroutineAwaitType;
    3535             :   #endif
    3536             :   #ifdef __Pyx_Coroutine_USED
    3537             :   PyTypeObject *__pyx_CoroutineType;
    3538             :   #endif
    3539             :   #if CYTHON_USE_MODULE_STATE
    3540             :   #endif
    3541             :   #if CYTHON_USE_MODULE_STATE
    3542             :   #endif
    3543             :   #if CYTHON_USE_MODULE_STATE
    3544             :   #endif
    3545             :   #if CYTHON_USE_MODULE_STATE
    3546             :   #endif
    3547             :   #if CYTHON_USE_MODULE_STATE
    3548             :   #endif
    3549             :   #if CYTHON_USE_MODULE_STATE
    3550             :   #endif
    3551             :   #if CYTHON_USE_MODULE_STATE
    3552             :   #endif
    3553             :   PyTypeObject *__pyx_ptype_7cpython_4type_type;
    3554             :   #if CYTHON_USE_MODULE_STATE
    3555             :   #endif
    3556             :   #if CYTHON_USE_MODULE_STATE
    3557             :   #endif
    3558             :   #if CYTHON_USE_MODULE_STATE
    3559             :   #endif
    3560             :   #if CYTHON_USE_MODULE_STATE
    3561             :   #endif
    3562             :   #if CYTHON_USE_MODULE_STATE
    3563             :   #endif
    3564             :   PyTypeObject *__pyx_ptype_5numpy_dtype;
    3565             :   PyTypeObject *__pyx_ptype_5numpy_flatiter;
    3566             :   PyTypeObject *__pyx_ptype_5numpy_broadcast;
    3567             :   PyTypeObject *__pyx_ptype_5numpy_ndarray;
    3568             :   PyTypeObject *__pyx_ptype_5numpy_generic;
    3569             :   PyTypeObject *__pyx_ptype_5numpy_number;
    3570             :   PyTypeObject *__pyx_ptype_5numpy_integer;
    3571             :   PyTypeObject *__pyx_ptype_5numpy_signedinteger;
    3572             :   PyTypeObject *__pyx_ptype_5numpy_unsignedinteger;
    3573             :   PyTypeObject *__pyx_ptype_5numpy_inexact;
    3574             :   PyTypeObject *__pyx_ptype_5numpy_floating;
    3575             :   PyTypeObject *__pyx_ptype_5numpy_complexfloating;
    3576             :   PyTypeObject *__pyx_ptype_5numpy_flexible;
    3577             :   PyTypeObject *__pyx_ptype_5numpy_character;
    3578             :   PyTypeObject *__pyx_ptype_5numpy_ufunc;
    3579             :   #if CYTHON_USE_MODULE_STATE
    3580             :   #endif
    3581             :   #if CYTHON_USE_MODULE_STATE
    3582             :   PyObject *__pyx_type___pyx_array;
    3583             :   PyObject *__pyx_type___pyx_MemviewEnum;
    3584             :   PyObject *__pyx_type___pyx_memoryview;
    3585             :   PyObject *__pyx_type___pyx_memoryviewslice;
    3586             :   #endif
    3587             :   PyTypeObject *__pyx_array_type;
    3588             :   PyTypeObject *__pyx_MemviewEnum_type;
    3589             :   PyTypeObject *__pyx_memoryview_type;
    3590             :   PyTypeObject *__pyx_memoryviewslice_type;
    3591             :   PyObject *__pyx_kp_u_;
    3592             :   PyObject *__pyx_n_s_ASCII;
    3593             :   PyObject *__pyx_kp_s_All_dimensions_preceding_dimensi;
    3594             :   PyObject *__pyx_n_s_AssertionError;
    3595             :   PyObject *__pyx_n_s_BTYPE;
    3596             :   PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
    3597             :   PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
    3598             :   PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
    3599             :   PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
    3600             :   PyObject *__pyx_kp_u_Cannot_index_with_type;
    3601             :   PyObject *__pyx_kp_s_Cannot_transpose_memoryview_with;
    3602             :   PyObject *__pyx_n_s_DTYPE;
    3603             :   PyObject *__pyx_kp_s_Dimension_d_is_not_direct;
    3604             :   PyObject *__pyx_n_s_Ellipsis;
    3605             :   PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
    3606             :   PyObject *__pyx_n_s_ITYPE;
    3607             :   PyObject *__pyx_n_s_ImportError;
    3608             :   PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
    3609             :   PyObject *__pyx_n_s_IndexError;
    3610             :   PyObject *__pyx_kp_s_Index_out_of_bounds_axis_d;
    3611             :   PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
    3612             :   PyObject *__pyx_kp_u_Invalid_mode_expected_c_or_fortr;
    3613             :   PyObject *__pyx_kp_u_Invalid_shape_in_axis;
    3614             :   PyObject *__pyx_n_s_MemoryError;
    3615             :   PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
    3616             :   PyObject *__pyx_kp_s_MemoryView_of_r_object;
    3617             :   PyObject *__pyx_n_b_O;
    3618             :   PyObject *__pyx_kp_u_Out_of_bounds_on_buffer_access_a;
    3619             :   PyObject *__pyx_n_s_PickleError;
    3620             :   PyObject *__pyx_n_s_Sequence;
    3621             :   PyObject *__pyx_kp_s_Step_may_not_be_zero_axis_d;
    3622             :   PyObject *__pyx_n_s_T;
    3623             :   PyObject *__pyx_n_s_TypeError;
    3624             :   PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
    3625             :   PyObject *__pyx_n_s_ValueError;
    3626             :   PyObject *__pyx_n_s_View_MemoryView;
    3627             :   PyObject *__pyx_kp_u__2;
    3628             :   PyObject *__pyx_n_s__28;
    3629             :   PyObject *__pyx_n_s__3;
    3630             :   PyObject *__pyx_n_s__32;
    3631             :   PyObject *__pyx_kp_u__6;
    3632             :   PyObject *__pyx_kp_u__7;
    3633             :   PyObject *__pyx_n_s_a;
    3634             :   PyObject *__pyx_n_s_abc;
    3635             :   PyObject *__pyx_n_s_all;
    3636             :   PyObject *__pyx_n_s_allocate_buffer;
    3637             :   PyObject *__pyx_kp_u_and;
    3638             :   PyObject *__pyx_n_s_arange;
    3639             :   PyObject *__pyx_n_s_argsort;
    3640             :   PyObject *__pyx_n_s_asarray;
    3641             :   PyObject *__pyx_n_s_astype;
    3642             :   PyObject *__pyx_n_s_asyncio_coroutines;
    3643             :   PyObject *__pyx_n_s_b;
    3644             :   PyObject *__pyx_n_s_base;
    3645             :   PyObject *__pyx_n_s_biadj_indices;
    3646             :   PyObject *__pyx_n_s_biadj_indptr;
    3647             :   PyObject *__pyx_n_s_biadjacency;
    3648             :   PyObject *__pyx_n_s_biadjacency_t;
    3649             :   PyObject *__pyx_n_s_bool;
    3650             :   PyObject *__pyx_n_s_c;
    3651             :   PyObject *__pyx_n_u_c;
    3652             :   PyObject *__pyx_n_s_class;
    3653             :   PyObject *__pyx_n_s_class_getitem;
    3654             :   PyObject *__pyx_n_s_cline_in_traceback;
    3655             :   PyObject *__pyx_n_s_collections;
    3656             :   PyObject *__pyx_kp_s_collections_abc;
    3657             :   PyObject *__pyx_n_u_column;
    3658             :   PyObject *__pyx_kp_s_contiguous_and_direct;
    3659             :   PyObject *__pyx_kp_s_contiguous_and_indirect;
    3660             :   PyObject *__pyx_n_s_convert_pydata_sparse_to_scipy;
    3661             :   PyObject *__pyx_n_u_coo;
    3662             :   PyObject *__pyx_n_s_count;
    3663             :   PyObject *__pyx_n_u_csc;
    3664             :   PyObject *__pyx_n_u_csr;
    3665             :   PyObject *__pyx_n_s_csr_array;
    3666             :   PyObject *__pyx_n_s_data;
    3667             :   PyObject *__pyx_n_s_dict;
    3668             :   PyObject *__pyx_kp_u_disable;
    3669             :   PyObject *__pyx_n_s_double;
    3670             :   PyObject *__pyx_n_s_dtype;
    3671             :   PyObject *__pyx_n_s_dtype_is_object;
    3672             :   PyObject *__pyx_n_s_eliminate_zeros;
    3673             :   PyObject *__pyx_n_s_empty;
    3674             :   PyObject *__pyx_kp_u_enable;
    3675             :   PyObject *__pyx_n_s_encode;
    3676             :   PyObject *__pyx_n_s_enumerate;
    3677             :   PyObject *__pyx_n_s_error;
    3678             :   PyObject *__pyx_kp_u_expected_a_matrix_containing_num;
    3679             :   PyObject *__pyx_kp_u_explicit_zero_weights_are_remove;
    3680             :   PyObject *__pyx_n_s_flags;
    3681             :   PyObject *__pyx_n_s_float64;
    3682             :   PyObject *__pyx_n_s_format;
    3683             :   PyObject *__pyx_n_s_fortran;
    3684             :   PyObject *__pyx_n_u_fortran;
    3685             :   PyObject *__pyx_kp_u_gc;
    3686             :   PyObject *__pyx_n_s_getstate;
    3687             :   PyObject *__pyx_kp_u_got;
    3688             :   PyObject *__pyx_kp_u_got_2;
    3689             :   PyObject *__pyx_kp_u_got_differing_extents_in_dimensi;
    3690             :   PyObject *__pyx_n_s_graph;
    3691             :   PyObject *__pyx_kp_u_graph_must_be_in_CSC_CSR_or_COO;
    3692             :   PyObject *__pyx_kp_u_graph_must_be_sparse;
    3693             :   PyObject *__pyx_kp_s_home_czgdp18079_Quansight_scipy;
    3694             :   PyObject *__pyx_n_s_i;
    3695             :   PyObject *__pyx_n_s_id;
    3696             :   PyObject *__pyx_n_s_iinfo;
    3697             :   PyObject *__pyx_n_s_import;
    3698             :   PyObject *__pyx_n_s_index;
    3699             :   PyObject *__pyx_n_s_indices;
    3700             :   PyObject *__pyx_n_s_indptr;
    3701             :   PyObject *__pyx_n_s_initializing;
    3702             :   PyObject *__pyx_n_s_int32;
    3703             :   PyObject *__pyx_n_s_is_coroutine;
    3704             :   PyObject *__pyx_kp_u_isenabled;
    3705             :   PyObject *__pyx_n_s_isposinf;
    3706             :   PyObject *__pyx_n_s_issparse;
    3707             :   PyObject *__pyx_n_s_issubdtype;
    3708             :   PyObject *__pyx_n_s_itemsize;
    3709             :   PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
    3710             :   PyObject *__pyx_n_s_j;
    3711             :   PyObject *__pyx_n_s_main;
    3712             :   PyObject *__pyx_n_s_matching;
    3713             :   PyObject *__pyx_n_s_max;
    3714             :   PyObject *__pyx_n_s_maximize;
    3715             :   PyObject *__pyx_n_s_maximum_bipartite_matching;
    3716             :   PyObject *__pyx_kp_u_maximum_bipartite_matching_grap;
    3717             :   PyObject *__pyx_kp_u_maximum_bipartite_matching_line;
    3718             :   PyObject *__pyx_n_s_memview;
    3719             :   PyObject *__pyx_n_s_min;
    3720             :   PyObject *__pyx_kp_u_min_weight_full_bipartite_match;
    3721             :   PyObject *__pyx_n_s_min_weight_full_bipartite_matchi;
    3722             :   PyObject *__pyx_kp_u_min_weight_full_bipartite_matchi_2;
    3723             :   PyObject *__pyx_n_s_mode;
    3724             :   PyObject *__pyx_n_s_name;
    3725             :   PyObject *__pyx_n_s_name_2;
    3726             :   PyObject *__pyx_n_s_ndim;
    3727             :   PyObject *__pyx_n_s_new;
    3728             :   PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
    3729             :   PyObject *__pyx_kp_u_no_full_matching_exists;
    3730             :   PyObject *__pyx_n_s_np;
    3731             :   PyObject *__pyx_n_s_numpy;
    3732             :   PyObject *__pyx_kp_u_numpy__core_multiarray_failed_to;
    3733             :   PyObject *__pyx_kp_u_numpy__core_umath_failed_to_impo;
    3734             :   PyObject *__pyx_n_s_obj;
    3735             :   PyObject *__pyx_n_s_pack;
    3736             :   PyObject *__pyx_n_s_perm_type;
    3737             :   PyObject *__pyx_n_s_pickle;
    3738             :   PyObject *__pyx_n_s_pyx_PickleError;
    3739             :   PyObject *__pyx_n_s_pyx_checksum;
    3740             :   PyObject *__pyx_n_s_pyx_result;
    3741             :   PyObject *__pyx_n_s_pyx_state;
    3742             :   PyObject *__pyx_n_s_pyx_type;
    3743             :   PyObject *__pyx_n_s_pyx_unpickle_Enum;
    3744             :   PyObject *__pyx_n_s_pyx_vtable;
    3745             :   PyObject *__pyx_n_s_range;
    3746             :   PyObject *__pyx_n_s_reduce;
    3747             :   PyObject *__pyx_n_s_reduce_cython;
    3748             :   PyObject *__pyx_n_s_reduce_ex;
    3749             :   PyObject *__pyx_n_s_register;
    3750             :   PyObject *__pyx_n_u_row;
    3751             :   PyObject *__pyx_n_s_safe_downcast_indices;
    3752             :   PyObject *__pyx_n_s_scipy_sparse;
    3753             :   PyObject *__pyx_n_s_scipy_sparse__sputils;
    3754             :   PyObject *__pyx_n_s_scipy_sparse_csgraph__matching;
    3755             :   PyObject *__pyx_n_s_setstate;
    3756             :   PyObject *__pyx_n_s_setstate_cython;
    3757             :   PyObject *__pyx_n_s_shape;
    3758             :   PyObject *__pyx_n_s_size;
    3759             :   PyObject *__pyx_n_s_spec;
    3760             :   PyObject *__pyx_n_s_start;
    3761             :   PyObject *__pyx_n_s_step;
    3762             :   PyObject *__pyx_n_s_stop;
    3763             :   PyObject *__pyx_kp_s_strided_and_direct;
    3764             :   PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
    3765             :   PyObject *__pyx_kp_s_strided_and_indirect;
    3766             :   PyObject *__pyx_kp_s_stringsource;
    3767             :   PyObject *__pyx_n_s_struct;
    3768             :   PyObject *__pyx_n_s_sum;
    3769             :   PyObject *__pyx_n_s_sys;
    3770             :   PyObject *__pyx_n_s_test;
    3771             :   PyObject *__pyx_n_s_tocsr;
    3772             :   PyObject *__pyx_n_s_tools;
    3773             :   PyObject *__pyx_n_s_uint8;
    3774             :   PyObject *__pyx_kp_s_unable_to_allocate_array_data;
    3775             :   PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
    3776             :   PyObject *__pyx_n_s_unpack;
    3777             :   PyObject *__pyx_n_s_update;
    3778             :   PyObject *__pyx_n_s_version_info;
    3779             :   PyObject *__pyx_n_s_warn;
    3780             :   PyObject *__pyx_n_s_warnings;
    3781             :   PyObject *__pyx_n_s_x;
    3782             :   PyObject *__pyx_n_s_y;
    3783             :   PyObject *__pyx_n_s_zeros;
    3784             :   PyObject *__pyx_int_0;
    3785             :   PyObject *__pyx_int_1;
    3786             :   PyObject *__pyx_int_3;
    3787             :   PyObject *__pyx_int_112105877;
    3788             :   PyObject *__pyx_int_136983863;
    3789             :   PyObject *__pyx_int_184977713;
    3790             :   PyObject *__pyx_int_neg_1;
    3791             :   PyObject *__pyx_slice__5;
    3792             :   PyObject *__pyx_tuple__4;
    3793             :   PyObject *__pyx_tuple__8;
    3794             :   PyObject *__pyx_tuple__9;
    3795             :   PyObject *__pyx_tuple__10;
    3796             :   PyObject *__pyx_tuple__11;
    3797             :   PyObject *__pyx_tuple__12;
    3798             :   PyObject *__pyx_tuple__13;
    3799             :   PyObject *__pyx_tuple__14;
    3800             :   PyObject *__pyx_tuple__15;
    3801             :   PyObject *__pyx_tuple__16;
    3802             :   PyObject *__pyx_tuple__17;
    3803             :   PyObject *__pyx_tuple__18;
    3804             :   PyObject *__pyx_tuple__19;
    3805             :   PyObject *__pyx_tuple__20;
    3806             :   PyObject *__pyx_tuple__21;
    3807             :   PyObject *__pyx_tuple__22;
    3808             :   PyObject *__pyx_tuple__23;
    3809             :   PyObject *__pyx_tuple__25;
    3810             :   PyObject *__pyx_tuple__27;
    3811             :   PyObject *__pyx_tuple__29;
    3812             :   PyObject *__pyx_tuple__31;
    3813             :   PyObject *__pyx_codeobj__24;
    3814             :   PyObject *__pyx_codeobj__26;
    3815             :   PyObject *__pyx_codeobj__30;
    3816             : } __pyx_mstate;
    3817             : 
    3818             : #if CYTHON_USE_MODULE_STATE
    3819             : #ifdef __cplusplus
    3820             : namespace {
    3821             :   extern struct PyModuleDef __pyx_moduledef;
    3822             : } /* anonymous namespace */
    3823             : #else
    3824             : static struct PyModuleDef __pyx_moduledef;
    3825             : #endif
    3826             : 
    3827             : #define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))
    3828             : 
    3829             : #define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))
    3830             : 
    3831             : #define __pyx_m (PyState_FindModule(&__pyx_moduledef))
    3832             : #else
    3833             : static __pyx_mstate __pyx_mstate_global_static =
    3834             : #ifdef __cplusplus
    3835             :     {};
    3836             : #else
    3837             :     {0};
    3838             : #endif
    3839             : static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static;
    3840             : #endif
    3841             : /* #### Code section: module_state_clear ### */
    3842             : #if CYTHON_USE_MODULE_STATE
    3843             : static int __pyx_m_clear(PyObject *m) {
    3844             :   __pyx_mstate *clear_module_state = __pyx_mstate(m);
    3845             :   if (!clear_module_state) return 0;
    3846             :   Py_CLEAR(clear_module_state->__pyx_d);
    3847             :   Py_CLEAR(clear_module_state->__pyx_b);
    3848             :   Py_CLEAR(clear_module_state->__pyx_cython_runtime);
    3849             :   Py_CLEAR(clear_module_state->__pyx_empty_tuple);
    3850             :   Py_CLEAR(clear_module_state->__pyx_empty_bytes);
    3851             :   Py_CLEAR(clear_module_state->__pyx_empty_unicode);
    3852             :   #ifdef __Pyx_CyFunction_USED
    3853             :   Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
    3854             :   #endif
    3855             :   #ifdef __Pyx_FusedFunction_USED
    3856             :   Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
    3857             :   #endif
    3858             :   Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
    3859             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_dtype);
    3860             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flatiter);
    3861             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_broadcast);
    3862             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ndarray);
    3863             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_generic);
    3864             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_number);
    3865             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_integer);
    3866             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_signedinteger);
    3867             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_unsignedinteger);
    3868             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_inexact);
    3869             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_floating);
    3870             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_complexfloating);
    3871             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flexible);
    3872             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_character);
    3873             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ufunc);
    3874             :   Py_CLEAR(clear_module_state->__pyx_array_type);
    3875             :   Py_CLEAR(clear_module_state->__pyx_type___pyx_array);
    3876             :   Py_CLEAR(clear_module_state->__pyx_MemviewEnum_type);
    3877             :   Py_CLEAR(clear_module_state->__pyx_type___pyx_MemviewEnum);
    3878             :   Py_CLEAR(clear_module_state->__pyx_memoryview_type);
    3879             :   Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryview);
    3880             :   Py_CLEAR(clear_module_state->__pyx_memoryviewslice_type);
    3881             :   Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryviewslice);
    3882             :   Py_CLEAR(clear_module_state->__pyx_kp_u_);
    3883             :   Py_CLEAR(clear_module_state->__pyx_n_s_ASCII);
    3884             :   Py_CLEAR(clear_module_state->__pyx_kp_s_All_dimensions_preceding_dimensi);
    3885             :   Py_CLEAR(clear_module_state->__pyx_n_s_AssertionError);
    3886             :   Py_CLEAR(clear_module_state->__pyx_n_s_BTYPE);
    3887             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Buffer_view_does_not_expose_stri);
    3888             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Can_only_create_a_buffer_that_is);
    3889             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_assign_to_read_only_memor);
    3890             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_create_writable_memory_vi);
    3891             :   Py_CLEAR(clear_module_state->__pyx_kp_u_Cannot_index_with_type);
    3892             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_transpose_memoryview_with);
    3893             :   Py_CLEAR(clear_module_state->__pyx_n_s_DTYPE);
    3894             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Dimension_d_is_not_direct);
    3895             :   Py_CLEAR(clear_module_state->__pyx_n_s_Ellipsis);
    3896             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Empty_shape_tuple_for_cython_arr);
    3897             :   Py_CLEAR(clear_module_state->__pyx_n_s_ITYPE);
    3898             :   Py_CLEAR(clear_module_state->__pyx_n_s_ImportError);
    3899             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
    3900             :   Py_CLEAR(clear_module_state->__pyx_n_s_IndexError);
    3901             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Index_out_of_bounds_axis_d);
    3902             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Indirect_dimensions_not_supporte);
    3903             :   Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_mode_expected_c_or_fortr);
    3904             :   Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_shape_in_axis);
    3905             :   Py_CLEAR(clear_module_state->__pyx_n_s_MemoryError);
    3906             :   Py_CLEAR(clear_module_state->__pyx_kp_s_MemoryView_of_r_at_0x_x);
    3907             :   Py_CLEAR(clear_module_state->__pyx_kp_s_MemoryView_of_r_object);
    3908             :   Py_CLEAR(clear_module_state->__pyx_n_b_O);
    3909             :   Py_CLEAR(clear_module_state->__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
    3910             :   Py_CLEAR(clear_module_state->__pyx_n_s_PickleError);
    3911             :   Py_CLEAR(clear_module_state->__pyx_n_s_Sequence);
    3912             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Step_may_not_be_zero_axis_d);
    3913             :   Py_CLEAR(clear_module_state->__pyx_n_s_T);
    3914             :   Py_CLEAR(clear_module_state->__pyx_n_s_TypeError);
    3915             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Unable_to_convert_item_to_object);
    3916             :   Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
    3917             :   Py_CLEAR(clear_module_state->__pyx_n_s_View_MemoryView);
    3918             :   Py_CLEAR(clear_module_state->__pyx_kp_u__2);
    3919             :   Py_CLEAR(clear_module_state->__pyx_n_s__28);
    3920             :   Py_CLEAR(clear_module_state->__pyx_n_s__3);
    3921             :   Py_CLEAR(clear_module_state->__pyx_n_s__32);
    3922             :   Py_CLEAR(clear_module_state->__pyx_kp_u__6);
    3923             :   Py_CLEAR(clear_module_state->__pyx_kp_u__7);
    3924             :   Py_CLEAR(clear_module_state->__pyx_n_s_a);
    3925             :   Py_CLEAR(clear_module_state->__pyx_n_s_abc);
    3926             :   Py_CLEAR(clear_module_state->__pyx_n_s_all);
    3927             :   Py_CLEAR(clear_module_state->__pyx_n_s_allocate_buffer);
    3928             :   Py_CLEAR(clear_module_state->__pyx_kp_u_and);
    3929             :   Py_CLEAR(clear_module_state->__pyx_n_s_arange);
    3930             :   Py_CLEAR(clear_module_state->__pyx_n_s_argsort);
    3931             :   Py_CLEAR(clear_module_state->__pyx_n_s_asarray);
    3932             :   Py_CLEAR(clear_module_state->__pyx_n_s_astype);
    3933             :   Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
    3934             :   Py_CLEAR(clear_module_state->__pyx_n_s_b);
    3935             :   Py_CLEAR(clear_module_state->__pyx_n_s_base);
    3936             :   Py_CLEAR(clear_module_state->__pyx_n_s_biadj_indices);
    3937             :   Py_CLEAR(clear_module_state->__pyx_n_s_biadj_indptr);
    3938             :   Py_CLEAR(clear_module_state->__pyx_n_s_biadjacency);
    3939             :   Py_CLEAR(clear_module_state->__pyx_n_s_biadjacency_t);
    3940             :   Py_CLEAR(clear_module_state->__pyx_n_s_bool);
    3941             :   Py_CLEAR(clear_module_state->__pyx_n_s_c);
    3942             :   Py_CLEAR(clear_module_state->__pyx_n_u_c);
    3943             :   Py_CLEAR(clear_module_state->__pyx_n_s_class);
    3944             :   Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem);
    3945             :   Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
    3946             :   Py_CLEAR(clear_module_state->__pyx_n_s_collections);
    3947             :   Py_CLEAR(clear_module_state->__pyx_kp_s_collections_abc);
    3948             :   Py_CLEAR(clear_module_state->__pyx_n_u_column);
    3949             :   Py_CLEAR(clear_module_state->__pyx_kp_s_contiguous_and_direct);
    3950             :   Py_CLEAR(clear_module_state->__pyx_kp_s_contiguous_and_indirect);
    3951             :   Py_CLEAR(clear_module_state->__pyx_n_s_convert_pydata_sparse_to_scipy);
    3952             :   Py_CLEAR(clear_module_state->__pyx_n_u_coo);
    3953             :   Py_CLEAR(clear_module_state->__pyx_n_s_count);
    3954             :   Py_CLEAR(clear_module_state->__pyx_n_u_csc);
    3955             :   Py_CLEAR(clear_module_state->__pyx_n_u_csr);
    3956             :   Py_CLEAR(clear_module_state->__pyx_n_s_csr_array);
    3957             :   Py_CLEAR(clear_module_state->__pyx_n_s_data);
    3958             :   Py_CLEAR(clear_module_state->__pyx_n_s_dict);
    3959             :   Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
    3960             :   Py_CLEAR(clear_module_state->__pyx_n_s_double);
    3961             :   Py_CLEAR(clear_module_state->__pyx_n_s_dtype);
    3962             :   Py_CLEAR(clear_module_state->__pyx_n_s_dtype_is_object);
    3963             :   Py_CLEAR(clear_module_state->__pyx_n_s_eliminate_zeros);
    3964             :   Py_CLEAR(clear_module_state->__pyx_n_s_empty);
    3965             :   Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
    3966             :   Py_CLEAR(clear_module_state->__pyx_n_s_encode);
    3967             :   Py_CLEAR(clear_module_state->__pyx_n_s_enumerate);
    3968             :   Py_CLEAR(clear_module_state->__pyx_n_s_error);
    3969             :   Py_CLEAR(clear_module_state->__pyx_kp_u_expected_a_matrix_containing_num);
    3970             :   Py_CLEAR(clear_module_state->__pyx_kp_u_explicit_zero_weights_are_remove);
    3971             :   Py_CLEAR(clear_module_state->__pyx_n_s_flags);
    3972             :   Py_CLEAR(clear_module_state->__pyx_n_s_float64);
    3973             :   Py_CLEAR(clear_module_state->__pyx_n_s_format);
    3974             :   Py_CLEAR(clear_module_state->__pyx_n_s_fortran);
    3975             :   Py_CLEAR(clear_module_state->__pyx_n_u_fortran);
    3976             :   Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
    3977             :   Py_CLEAR(clear_module_state->__pyx_n_s_getstate);
    3978             :   Py_CLEAR(clear_module_state->__pyx_kp_u_got);
    3979             :   Py_CLEAR(clear_module_state->__pyx_kp_u_got_2);
    3980             :   Py_CLEAR(clear_module_state->__pyx_kp_u_got_differing_extents_in_dimensi);
    3981             :   Py_CLEAR(clear_module_state->__pyx_n_s_graph);
    3982             :   Py_CLEAR(clear_module_state->__pyx_kp_u_graph_must_be_in_CSC_CSR_or_COO);
    3983             :   Py_CLEAR(clear_module_state->__pyx_kp_u_graph_must_be_sparse);
    3984             :   Py_CLEAR(clear_module_state->__pyx_kp_s_home_czgdp18079_Quansight_scipy);
    3985             :   Py_CLEAR(clear_module_state->__pyx_n_s_i);
    3986             :   Py_CLEAR(clear_module_state->__pyx_n_s_id);
    3987             :   Py_CLEAR(clear_module_state->__pyx_n_s_iinfo);
    3988             :   Py_CLEAR(clear_module_state->__pyx_n_s_import);
    3989             :   Py_CLEAR(clear_module_state->__pyx_n_s_index);
    3990             :   Py_CLEAR(clear_module_state->__pyx_n_s_indices);
    3991             :   Py_CLEAR(clear_module_state->__pyx_n_s_indptr);
    3992             :   Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
    3993             :   Py_CLEAR(clear_module_state->__pyx_n_s_int32);
    3994             :   Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
    3995             :   Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
    3996             :   Py_CLEAR(clear_module_state->__pyx_n_s_isposinf);
    3997             :   Py_CLEAR(clear_module_state->__pyx_n_s_issparse);
    3998             :   Py_CLEAR(clear_module_state->__pyx_n_s_issubdtype);
    3999             :   Py_CLEAR(clear_module_state->__pyx_n_s_itemsize);
    4000             :   Py_CLEAR(clear_module_state->__pyx_kp_s_itemsize_0_for_cython_array);
    4001             :   Py_CLEAR(clear_module_state->__pyx_n_s_j);
    4002             :   Py_CLEAR(clear_module_state->__pyx_n_s_main);
    4003             :   Py_CLEAR(clear_module_state->__pyx_n_s_matching);
    4004             :   Py_CLEAR(clear_module_state->__pyx_n_s_max);
    4005             :   Py_CLEAR(clear_module_state->__pyx_n_s_maximize);
    4006             :   Py_CLEAR(clear_module_state->__pyx_n_s_maximum_bipartite_matching);
    4007             :   Py_CLEAR(clear_module_state->__pyx_kp_u_maximum_bipartite_matching_grap);
    4008             :   Py_CLEAR(clear_module_state->__pyx_kp_u_maximum_bipartite_matching_line);
    4009             :   Py_CLEAR(clear_module_state->__pyx_n_s_memview);
    4010             :   Py_CLEAR(clear_module_state->__pyx_n_s_min);
    4011             :   Py_CLEAR(clear_module_state->__pyx_kp_u_min_weight_full_bipartite_match);
    4012             :   Py_CLEAR(clear_module_state->__pyx_n_s_min_weight_full_bipartite_matchi);
    4013             :   Py_CLEAR(clear_module_state->__pyx_kp_u_min_weight_full_bipartite_matchi_2);
    4014             :   Py_CLEAR(clear_module_state->__pyx_n_s_mode);
    4015             :   Py_CLEAR(clear_module_state->__pyx_n_s_name);
    4016             :   Py_CLEAR(clear_module_state->__pyx_n_s_name_2);
    4017             :   Py_CLEAR(clear_module_state->__pyx_n_s_ndim);
    4018             :   Py_CLEAR(clear_module_state->__pyx_n_s_new);
    4019             :   Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
    4020             :   Py_CLEAR(clear_module_state->__pyx_kp_u_no_full_matching_exists);
    4021             :   Py_CLEAR(clear_module_state->__pyx_n_s_np);
    4022             :   Py_CLEAR(clear_module_state->__pyx_n_s_numpy);
    4023             :   Py_CLEAR(clear_module_state->__pyx_kp_u_numpy__core_multiarray_failed_to);
    4024             :   Py_CLEAR(clear_module_state->__pyx_kp_u_numpy__core_umath_failed_to_impo);
    4025             :   Py_CLEAR(clear_module_state->__pyx_n_s_obj);
    4026             :   Py_CLEAR(clear_module_state->__pyx_n_s_pack);
    4027             :   Py_CLEAR(clear_module_state->__pyx_n_s_perm_type);
    4028             :   Py_CLEAR(clear_module_state->__pyx_n_s_pickle);
    4029             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError);
    4030             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum);
    4031             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result);
    4032             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state);
    4033             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type);
    4034             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Enum);
    4035             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable);
    4036             :   Py_CLEAR(clear_module_state->__pyx_n_s_range);
    4037             :   Py_CLEAR(clear_module_state->__pyx_n_s_reduce);
    4038             :   Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython);
    4039             :   Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex);
    4040             :   Py_CLEAR(clear_module_state->__pyx_n_s_register);
    4041             :   Py_CLEAR(clear_module_state->__pyx_n_u_row);
    4042             :   Py_CLEAR(clear_module_state->__pyx_n_s_safe_downcast_indices);
    4043             :   Py_CLEAR(clear_module_state->__pyx_n_s_scipy_sparse);
    4044             :   Py_CLEAR(clear_module_state->__pyx_n_s_scipy_sparse__sputils);
    4045             :   Py_CLEAR(clear_module_state->__pyx_n_s_scipy_sparse_csgraph__matching);
    4046             :   Py_CLEAR(clear_module_state->__pyx_n_s_setstate);
    4047             :   Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython);
    4048             :   Py_CLEAR(clear_module_state->__pyx_n_s_shape);
    4049             :   Py_CLEAR(clear_module_state->__pyx_n_s_size);
    4050             :   Py_CLEAR(clear_module_state->__pyx_n_s_spec);
    4051             :   Py_CLEAR(clear_module_state->__pyx_n_s_start);
    4052             :   Py_CLEAR(clear_module_state->__pyx_n_s_step);
    4053             :   Py_CLEAR(clear_module_state->__pyx_n_s_stop);
    4054             :   Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_direct);
    4055             :   Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_direct_or_indirect);
    4056             :   Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_indirect);
    4057             :   Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource);
    4058             :   Py_CLEAR(clear_module_state->__pyx_n_s_struct);
    4059             :   Py_CLEAR(clear_module_state->__pyx_n_s_sum);
    4060             :   Py_CLEAR(clear_module_state->__pyx_n_s_sys);
    4061             :   Py_CLEAR(clear_module_state->__pyx_n_s_test);
    4062             :   Py_CLEAR(clear_module_state->__pyx_n_s_tocsr);
    4063             :   Py_CLEAR(clear_module_state->__pyx_n_s_tools);
    4064             :   Py_CLEAR(clear_module_state->__pyx_n_s_uint8);
    4065             :   Py_CLEAR(clear_module_state->__pyx_kp_s_unable_to_allocate_array_data);
    4066             :   Py_CLEAR(clear_module_state->__pyx_kp_s_unable_to_allocate_shape_and_str);
    4067             :   Py_CLEAR(clear_module_state->__pyx_n_s_unpack);
    4068             :   Py_CLEAR(clear_module_state->__pyx_n_s_update);
    4069             :   Py_CLEAR(clear_module_state->__pyx_n_s_version_info);
    4070             :   Py_CLEAR(clear_module_state->__pyx_n_s_warn);
    4071             :   Py_CLEAR(clear_module_state->__pyx_n_s_warnings);
    4072             :   Py_CLEAR(clear_module_state->__pyx_n_s_x);
    4073             :   Py_CLEAR(clear_module_state->__pyx_n_s_y);
    4074             :   Py_CLEAR(clear_module_state->__pyx_n_s_zeros);
    4075             :   Py_CLEAR(clear_module_state->__pyx_int_0);
    4076             :   Py_CLEAR(clear_module_state->__pyx_int_1);
    4077             :   Py_CLEAR(clear_module_state->__pyx_int_3);
    4078             :   Py_CLEAR(clear_module_state->__pyx_int_112105877);
    4079             :   Py_CLEAR(clear_module_state->__pyx_int_136983863);
    4080             :   Py_CLEAR(clear_module_state->__pyx_int_184977713);
    4081             :   Py_CLEAR(clear_module_state->__pyx_int_neg_1);
    4082             :   Py_CLEAR(clear_module_state->__pyx_slice__5);
    4083             :   Py_CLEAR(clear_module_state->__pyx_tuple__4);
    4084             :   Py_CLEAR(clear_module_state->__pyx_tuple__8);
    4085             :   Py_CLEAR(clear_module_state->__pyx_tuple__9);
    4086             :   Py_CLEAR(clear_module_state->__pyx_tuple__10);
    4087             :   Py_CLEAR(clear_module_state->__pyx_tuple__11);
    4088             :   Py_CLEAR(clear_module_state->__pyx_tuple__12);
    4089             :   Py_CLEAR(clear_module_state->__pyx_tuple__13);
    4090             :   Py_CLEAR(clear_module_state->__pyx_tuple__14);
    4091             :   Py_CLEAR(clear_module_state->__pyx_tuple__15);
    4092             :   Py_CLEAR(clear_module_state->__pyx_tuple__16);
    4093             :   Py_CLEAR(clear_module_state->__pyx_tuple__17);
    4094             :   Py_CLEAR(clear_module_state->__pyx_tuple__18);
    4095             :   Py_CLEAR(clear_module_state->__pyx_tuple__19);
    4096             :   Py_CLEAR(clear_module_state->__pyx_tuple__20);
    4097             :   Py_CLEAR(clear_module_state->__pyx_tuple__21);
    4098             :   Py_CLEAR(clear_module_state->__pyx_tuple__22);
    4099             :   Py_CLEAR(clear_module_state->__pyx_tuple__23);
    4100             :   Py_CLEAR(clear_module_state->__pyx_tuple__25);
    4101             :   Py_CLEAR(clear_module_state->__pyx_tuple__27);
    4102             :   Py_CLEAR(clear_module_state->__pyx_tuple__29);
    4103             :   Py_CLEAR(clear_module_state->__pyx_tuple__31);
    4104             :   Py_CLEAR(clear_module_state->__pyx_codeobj__24);
    4105             :   Py_CLEAR(clear_module_state->__pyx_codeobj__26);
    4106             :   Py_CLEAR(clear_module_state->__pyx_codeobj__30);
    4107             :   return 0;
    4108             : }
    4109             : #endif
    4110             : /* #### Code section: module_state_traverse ### */
    4111             : #if CYTHON_USE_MODULE_STATE
    4112             : static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
    4113             :   __pyx_mstate *traverse_module_state = __pyx_mstate(m);
    4114             :   if (!traverse_module_state) return 0;
    4115             :   Py_VISIT(traverse_module_state->__pyx_d);
    4116             :   Py_VISIT(traverse_module_state->__pyx_b);
    4117             :   Py_VISIT(traverse_module_state->__pyx_cython_runtime);
    4118             :   Py_VISIT(traverse_module_state->__pyx_empty_tuple);
    4119             :   Py_VISIT(traverse_module_state->__pyx_empty_bytes);
    4120             :   Py_VISIT(traverse_module_state->__pyx_empty_unicode);
    4121             :   #ifdef __Pyx_CyFunction_USED
    4122             :   Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
    4123             :   #endif
    4124             :   #ifdef __Pyx_FusedFunction_USED
    4125             :   Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
    4126             :   #endif
    4127             :   Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
    4128             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_dtype);
    4129             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flatiter);
    4130             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_broadcast);
    4131             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ndarray);
    4132             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_generic);
    4133             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_number);
    4134             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_integer);
    4135             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_signedinteger);
    4136             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_unsignedinteger);
    4137             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_inexact);
    4138             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_floating);
    4139             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_complexfloating);
    4140             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flexible);
    4141             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_character);
    4142             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ufunc);
    4143             :   Py_VISIT(traverse_module_state->__pyx_array_type);
    4144             :   Py_VISIT(traverse_module_state->__pyx_type___pyx_array);
    4145             :   Py_VISIT(traverse_module_state->__pyx_MemviewEnum_type);
    4146             :   Py_VISIT(traverse_module_state->__pyx_type___pyx_MemviewEnum);
    4147             :   Py_VISIT(traverse_module_state->__pyx_memoryview_type);
    4148             :   Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryview);
    4149             :   Py_VISIT(traverse_module_state->__pyx_memoryviewslice_type);
    4150             :   Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryviewslice);
    4151             :   Py_VISIT(traverse_module_state->__pyx_kp_u_);
    4152             :   Py_VISIT(traverse_module_state->__pyx_n_s_ASCII);
    4153             :   Py_VISIT(traverse_module_state->__pyx_kp_s_All_dimensions_preceding_dimensi);
    4154             :   Py_VISIT(traverse_module_state->__pyx_n_s_AssertionError);
    4155             :   Py_VISIT(traverse_module_state->__pyx_n_s_BTYPE);
    4156             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Buffer_view_does_not_expose_stri);
    4157             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Can_only_create_a_buffer_that_is);
    4158             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_assign_to_read_only_memor);
    4159             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_create_writable_memory_vi);
    4160             :   Py_VISIT(traverse_module_state->__pyx_kp_u_Cannot_index_with_type);
    4161             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_transpose_memoryview_with);
    4162             :   Py_VISIT(traverse_module_state->__pyx_n_s_DTYPE);
    4163             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Dimension_d_is_not_direct);
    4164             :   Py_VISIT(traverse_module_state->__pyx_n_s_Ellipsis);
    4165             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Empty_shape_tuple_for_cython_arr);
    4166             :   Py_VISIT(traverse_module_state->__pyx_n_s_ITYPE);
    4167             :   Py_VISIT(traverse_module_state->__pyx_n_s_ImportError);
    4168             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
    4169             :   Py_VISIT(traverse_module_state->__pyx_n_s_IndexError);
    4170             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Index_out_of_bounds_axis_d);
    4171             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Indirect_dimensions_not_supporte);
    4172             :   Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_mode_expected_c_or_fortr);
    4173             :   Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_shape_in_axis);
    4174             :   Py_VISIT(traverse_module_state->__pyx_n_s_MemoryError);
    4175             :   Py_VISIT(traverse_module_state->__pyx_kp_s_MemoryView_of_r_at_0x_x);
    4176             :   Py_VISIT(traverse_module_state->__pyx_kp_s_MemoryView_of_r_object);
    4177             :   Py_VISIT(traverse_module_state->__pyx_n_b_O);
    4178             :   Py_VISIT(traverse_module_state->__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
    4179             :   Py_VISIT(traverse_module_state->__pyx_n_s_PickleError);
    4180             :   Py_VISIT(traverse_module_state->__pyx_n_s_Sequence);
    4181             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Step_may_not_be_zero_axis_d);
    4182             :   Py_VISIT(traverse_module_state->__pyx_n_s_T);
    4183             :   Py_VISIT(traverse_module_state->__pyx_n_s_TypeError);
    4184             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Unable_to_convert_item_to_object);
    4185             :   Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
    4186             :   Py_VISIT(traverse_module_state->__pyx_n_s_View_MemoryView);
    4187             :   Py_VISIT(traverse_module_state->__pyx_kp_u__2);
    4188             :   Py_VISIT(traverse_module_state->__pyx_n_s__28);
    4189             :   Py_VISIT(traverse_module_state->__pyx_n_s__3);
    4190             :   Py_VISIT(traverse_module_state->__pyx_n_s__32);
    4191             :   Py_VISIT(traverse_module_state->__pyx_kp_u__6);
    4192             :   Py_VISIT(traverse_module_state->__pyx_kp_u__7);
    4193             :   Py_VISIT(traverse_module_state->__pyx_n_s_a);
    4194             :   Py_VISIT(traverse_module_state->__pyx_n_s_abc);
    4195             :   Py_VISIT(traverse_module_state->__pyx_n_s_all);
    4196             :   Py_VISIT(traverse_module_state->__pyx_n_s_allocate_buffer);
    4197             :   Py_VISIT(traverse_module_state->__pyx_kp_u_and);
    4198             :   Py_VISIT(traverse_module_state->__pyx_n_s_arange);
    4199             :   Py_VISIT(traverse_module_state->__pyx_n_s_argsort);
    4200             :   Py_VISIT(traverse_module_state->__pyx_n_s_asarray);
    4201             :   Py_VISIT(traverse_module_state->__pyx_n_s_astype);
    4202             :   Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
    4203             :   Py_VISIT(traverse_module_state->__pyx_n_s_b);
    4204             :   Py_VISIT(traverse_module_state->__pyx_n_s_base);
    4205             :   Py_VISIT(traverse_module_state->__pyx_n_s_biadj_indices);
    4206             :   Py_VISIT(traverse_module_state->__pyx_n_s_biadj_indptr);
    4207             :   Py_VISIT(traverse_module_state->__pyx_n_s_biadjacency);
    4208             :   Py_VISIT(traverse_module_state->__pyx_n_s_biadjacency_t);
    4209             :   Py_VISIT(traverse_module_state->__pyx_n_s_bool);
    4210             :   Py_VISIT(traverse_module_state->__pyx_n_s_c);
    4211             :   Py_VISIT(traverse_module_state->__pyx_n_u_c);
    4212             :   Py_VISIT(traverse_module_state->__pyx_n_s_class);
    4213             :   Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem);
    4214             :   Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
    4215             :   Py_VISIT(traverse_module_state->__pyx_n_s_collections);
    4216             :   Py_VISIT(traverse_module_state->__pyx_kp_s_collections_abc);
    4217             :   Py_VISIT(traverse_module_state->__pyx_n_u_column);
    4218             :   Py_VISIT(traverse_module_state->__pyx_kp_s_contiguous_and_direct);
    4219             :   Py_VISIT(traverse_module_state->__pyx_kp_s_contiguous_and_indirect);
    4220             :   Py_VISIT(traverse_module_state->__pyx_n_s_convert_pydata_sparse_to_scipy);
    4221             :   Py_VISIT(traverse_module_state->__pyx_n_u_coo);
    4222             :   Py_VISIT(traverse_module_state->__pyx_n_s_count);
    4223             :   Py_VISIT(traverse_module_state->__pyx_n_u_csc);
    4224             :   Py_VISIT(traverse_module_state->__pyx_n_u_csr);
    4225             :   Py_VISIT(traverse_module_state->__pyx_n_s_csr_array);
    4226             :   Py_VISIT(traverse_module_state->__pyx_n_s_data);
    4227             :   Py_VISIT(traverse_module_state->__pyx_n_s_dict);
    4228             :   Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
    4229             :   Py_VISIT(traverse_module_state->__pyx_n_s_double);
    4230             :   Py_VISIT(traverse_module_state->__pyx_n_s_dtype);
    4231             :   Py_VISIT(traverse_module_state->__pyx_n_s_dtype_is_object);
    4232             :   Py_VISIT(traverse_module_state->__pyx_n_s_eliminate_zeros);
    4233             :   Py_VISIT(traverse_module_state->__pyx_n_s_empty);
    4234             :   Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
    4235             :   Py_VISIT(traverse_module_state->__pyx_n_s_encode);
    4236             :   Py_VISIT(traverse_module_state->__pyx_n_s_enumerate);
    4237             :   Py_VISIT(traverse_module_state->__pyx_n_s_error);
    4238             :   Py_VISIT(traverse_module_state->__pyx_kp_u_expected_a_matrix_containing_num);
    4239             :   Py_VISIT(traverse_module_state->__pyx_kp_u_explicit_zero_weights_are_remove);
    4240             :   Py_VISIT(traverse_module_state->__pyx_n_s_flags);
    4241             :   Py_VISIT(traverse_module_state->__pyx_n_s_float64);
    4242             :   Py_VISIT(traverse_module_state->__pyx_n_s_format);
    4243             :   Py_VISIT(traverse_module_state->__pyx_n_s_fortran);
    4244             :   Py_VISIT(traverse_module_state->__pyx_n_u_fortran);
    4245             :   Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
    4246             :   Py_VISIT(traverse_module_state->__pyx_n_s_getstate);
    4247             :   Py_VISIT(traverse_module_state->__pyx_kp_u_got);
    4248             :   Py_VISIT(traverse_module_state->__pyx_kp_u_got_2);
    4249             :   Py_VISIT(traverse_module_state->__pyx_kp_u_got_differing_extents_in_dimensi);
    4250             :   Py_VISIT(traverse_module_state->__pyx_n_s_graph);
    4251             :   Py_VISIT(traverse_module_state->__pyx_kp_u_graph_must_be_in_CSC_CSR_or_COO);
    4252             :   Py_VISIT(traverse_module_state->__pyx_kp_u_graph_must_be_sparse);
    4253             :   Py_VISIT(traverse_module_state->__pyx_kp_s_home_czgdp18079_Quansight_scipy);
    4254             :   Py_VISIT(traverse_module_state->__pyx_n_s_i);
    4255             :   Py_VISIT(traverse_module_state->__pyx_n_s_id);
    4256             :   Py_VISIT(traverse_module_state->__pyx_n_s_iinfo);
    4257             :   Py_VISIT(traverse_module_state->__pyx_n_s_import);
    4258             :   Py_VISIT(traverse_module_state->__pyx_n_s_index);
    4259             :   Py_VISIT(traverse_module_state->__pyx_n_s_indices);
    4260             :   Py_VISIT(traverse_module_state->__pyx_n_s_indptr);
    4261             :   Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
    4262             :   Py_VISIT(traverse_module_state->__pyx_n_s_int32);
    4263             :   Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
    4264             :   Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
    4265             :   Py_VISIT(traverse_module_state->__pyx_n_s_isposinf);
    4266             :   Py_VISIT(traverse_module_state->__pyx_n_s_issparse);
    4267             :   Py_VISIT(traverse_module_state->__pyx_n_s_issubdtype);
    4268             :   Py_VISIT(traverse_module_state->__pyx_n_s_itemsize);
    4269             :   Py_VISIT(traverse_module_state->__pyx_kp_s_itemsize_0_for_cython_array);
    4270             :   Py_VISIT(traverse_module_state->__pyx_n_s_j);
    4271             :   Py_VISIT(traverse_module_state->__pyx_n_s_main);
    4272             :   Py_VISIT(traverse_module_state->__pyx_n_s_matching);
    4273             :   Py_VISIT(traverse_module_state->__pyx_n_s_max);
    4274             :   Py_VISIT(traverse_module_state->__pyx_n_s_maximize);
    4275             :   Py_VISIT(traverse_module_state->__pyx_n_s_maximum_bipartite_matching);
    4276             :   Py_VISIT(traverse_module_state->__pyx_kp_u_maximum_bipartite_matching_grap);
    4277             :   Py_VISIT(traverse_module_state->__pyx_kp_u_maximum_bipartite_matching_line);
    4278             :   Py_VISIT(traverse_module_state->__pyx_n_s_memview);
    4279             :   Py_VISIT(traverse_module_state->__pyx_n_s_min);
    4280             :   Py_VISIT(traverse_module_state->__pyx_kp_u_min_weight_full_bipartite_match);
    4281             :   Py_VISIT(traverse_module_state->__pyx_n_s_min_weight_full_bipartite_matchi);
    4282             :   Py_VISIT(traverse_module_state->__pyx_kp_u_min_weight_full_bipartite_matchi_2);
    4283             :   Py_VISIT(traverse_module_state->__pyx_n_s_mode);
    4284             :   Py_VISIT(traverse_module_state->__pyx_n_s_name);
    4285             :   Py_VISIT(traverse_module_state->__pyx_n_s_name_2);
    4286             :   Py_VISIT(traverse_module_state->__pyx_n_s_ndim);
    4287             :   Py_VISIT(traverse_module_state->__pyx_n_s_new);
    4288             :   Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
    4289             :   Py_VISIT(traverse_module_state->__pyx_kp_u_no_full_matching_exists);
    4290             :   Py_VISIT(traverse_module_state->__pyx_n_s_np);
    4291             :   Py_VISIT(traverse_module_state->__pyx_n_s_numpy);
    4292             :   Py_VISIT(traverse_module_state->__pyx_kp_u_numpy__core_multiarray_failed_to);
    4293             :   Py_VISIT(traverse_module_state->__pyx_kp_u_numpy__core_umath_failed_to_impo);
    4294             :   Py_VISIT(traverse_module_state->__pyx_n_s_obj);
    4295             :   Py_VISIT(traverse_module_state->__pyx_n_s_pack);
    4296             :   Py_VISIT(traverse_module_state->__pyx_n_s_perm_type);
    4297             :   Py_VISIT(traverse_module_state->__pyx_n_s_pickle);
    4298             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError);
    4299             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum);
    4300             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result);
    4301             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state);
    4302             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type);
    4303             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Enum);
    4304             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable);
    4305             :   Py_VISIT(traverse_module_state->__pyx_n_s_range);
    4306             :   Py_VISIT(traverse_module_state->__pyx_n_s_reduce);
    4307             :   Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython);
    4308             :   Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex);
    4309             :   Py_VISIT(traverse_module_state->__pyx_n_s_register);
    4310             :   Py_VISIT(traverse_module_state->__pyx_n_u_row);
    4311             :   Py_VISIT(traverse_module_state->__pyx_n_s_safe_downcast_indices);
    4312             :   Py_VISIT(traverse_module_state->__pyx_n_s_scipy_sparse);
    4313             :   Py_VISIT(traverse_module_state->__pyx_n_s_scipy_sparse__sputils);
    4314             :   Py_VISIT(traverse_module_state->__pyx_n_s_scipy_sparse_csgraph__matching);
    4315             :   Py_VISIT(traverse_module_state->__pyx_n_s_setstate);
    4316             :   Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython);
    4317             :   Py_VISIT(traverse_module_state->__pyx_n_s_shape);
    4318             :   Py_VISIT(traverse_module_state->__pyx_n_s_size);
    4319             :   Py_VISIT(traverse_module_state->__pyx_n_s_spec);
    4320             :   Py_VISIT(traverse_module_state->__pyx_n_s_start);
    4321             :   Py_VISIT(traverse_module_state->__pyx_n_s_step);
    4322             :   Py_VISIT(traverse_module_state->__pyx_n_s_stop);
    4323             :   Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_direct);
    4324             :   Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_direct_or_indirect);
    4325             :   Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_indirect);
    4326             :   Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource);
    4327             :   Py_VISIT(traverse_module_state->__pyx_n_s_struct);
    4328             :   Py_VISIT(traverse_module_state->__pyx_n_s_sum);
    4329             :   Py_VISIT(traverse_module_state->__pyx_n_s_sys);
    4330             :   Py_VISIT(traverse_module_state->__pyx_n_s_test);
    4331             :   Py_VISIT(traverse_module_state->__pyx_n_s_tocsr);
    4332             :   Py_VISIT(traverse_module_state->__pyx_n_s_tools);
    4333             :   Py_VISIT(traverse_module_state->__pyx_n_s_uint8);
    4334             :   Py_VISIT(traverse_module_state->__pyx_kp_s_unable_to_allocate_array_data);
    4335             :   Py_VISIT(traverse_module_state->__pyx_kp_s_unable_to_allocate_shape_and_str);
    4336             :   Py_VISIT(traverse_module_state->__pyx_n_s_unpack);
    4337             :   Py_VISIT(traverse_module_state->__pyx_n_s_update);
    4338             :   Py_VISIT(traverse_module_state->__pyx_n_s_version_info);
    4339             :   Py_VISIT(traverse_module_state->__pyx_n_s_warn);
    4340             :   Py_VISIT(traverse_module_state->__pyx_n_s_warnings);
    4341             :   Py_VISIT(traverse_module_state->__pyx_n_s_x);
    4342             :   Py_VISIT(traverse_module_state->__pyx_n_s_y);
    4343             :   Py_VISIT(traverse_module_state->__pyx_n_s_zeros);
    4344             :   Py_VISIT(traverse_module_state->__pyx_int_0);
    4345             :   Py_VISIT(traverse_module_state->__pyx_int_1);
    4346             :   Py_VISIT(traverse_module_state->__pyx_int_3);
    4347             :   Py_VISIT(traverse_module_state->__pyx_int_112105877);
    4348             :   Py_VISIT(traverse_module_state->__pyx_int_136983863);
    4349             :   Py_VISIT(traverse_module_state->__pyx_int_184977713);
    4350             :   Py_VISIT(traverse_module_state->__pyx_int_neg_1);
    4351             :   Py_VISIT(traverse_module_state->__pyx_slice__5);
    4352             :   Py_VISIT(traverse_module_state->__pyx_tuple__4);
    4353             :   Py_VISIT(traverse_module_state->__pyx_tuple__8);
    4354             :   Py_VISIT(traverse_module_state->__pyx_tuple__9);
    4355             :   Py_VISIT(traverse_module_state->__pyx_tuple__10);
    4356             :   Py_VISIT(traverse_module_state->__pyx_tuple__11);
    4357             :   Py_VISIT(traverse_module_state->__pyx_tuple__12);
    4358             :   Py_VISIT(traverse_module_state->__pyx_tuple__13);
    4359             :   Py_VISIT(traverse_module_state->__pyx_tuple__14);
    4360             :   Py_VISIT(traverse_module_state->__pyx_tuple__15);
    4361             :   Py_VISIT(traverse_module_state->__pyx_tuple__16);
    4362             :   Py_VISIT(traverse_module_state->__pyx_tuple__17);
    4363             :   Py_VISIT(traverse_module_state->__pyx_tuple__18);
    4364             :   Py_VISIT(traverse_module_state->__pyx_tuple__19);
    4365             :   Py_VISIT(traverse_module_state->__pyx_tuple__20);
    4366             :   Py_VISIT(traverse_module_state->__pyx_tuple__21);
    4367             :   Py_VISIT(traverse_module_state->__pyx_tuple__22);
    4368             :   Py_VISIT(traverse_module_state->__pyx_tuple__23);
    4369             :   Py_VISIT(traverse_module_state->__pyx_tuple__25);
    4370             :   Py_VISIT(traverse_module_state->__pyx_tuple__27);
    4371             :   Py_VISIT(traverse_module_state->__pyx_tuple__29);
    4372             :   Py_VISIT(traverse_module_state->__pyx_tuple__31);
    4373             :   Py_VISIT(traverse_module_state->__pyx_codeobj__24);
    4374             :   Py_VISIT(traverse_module_state->__pyx_codeobj__26);
    4375             :   Py_VISIT(traverse_module_state->__pyx_codeobj__30);
    4376             :   return 0;
    4377             : }
    4378             : #endif
    4379             : /* #### Code section: module_state_defines ### */
    4380             : #define __pyx_d __pyx_mstate_global->__pyx_d
    4381             : #define __pyx_b __pyx_mstate_global->__pyx_b
    4382             : #define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
    4383             : #define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
    4384             : #define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
    4385             : #define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
    4386             : #ifdef __Pyx_CyFunction_USED
    4387             : #define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
    4388             : #endif
    4389             : #ifdef __Pyx_FusedFunction_USED
    4390             : #define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
    4391             : #endif
    4392             : #ifdef __Pyx_Generator_USED
    4393             : #define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType
    4394             : #endif
    4395             : #ifdef __Pyx_IterableCoroutine_USED
    4396             : #define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType
    4397             : #endif
    4398             : #ifdef __Pyx_Coroutine_USED
    4399             : #define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType
    4400             : #endif
    4401             : #ifdef __Pyx_Coroutine_USED
    4402             : #define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType
    4403             : #endif
    4404             : #if CYTHON_USE_MODULE_STATE
    4405             : #endif
    4406             : #if CYTHON_USE_MODULE_STATE
    4407             : #endif
    4408             : #if CYTHON_USE_MODULE_STATE
    4409             : #endif
    4410             : #if CYTHON_USE_MODULE_STATE
    4411             : #endif
    4412             : #if CYTHON_USE_MODULE_STATE
    4413             : #endif
    4414             : #if CYTHON_USE_MODULE_STATE
    4415             : #endif
    4416             : #if CYTHON_USE_MODULE_STATE
    4417             : #endif
    4418             : #define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type
    4419             : #if CYTHON_USE_MODULE_STATE
    4420             : #endif
    4421             : #if CYTHON_USE_MODULE_STATE
    4422             : #endif
    4423             : #if CYTHON_USE_MODULE_STATE
    4424             : #endif
    4425             : #if CYTHON_USE_MODULE_STATE
    4426             : #endif
    4427             : #if CYTHON_USE_MODULE_STATE
    4428             : #endif
    4429             : #define __pyx_ptype_5numpy_dtype __pyx_mstate_global->__pyx_ptype_5numpy_dtype
    4430             : #define __pyx_ptype_5numpy_flatiter __pyx_mstate_global->__pyx_ptype_5numpy_flatiter
    4431             : #define __pyx_ptype_5numpy_broadcast __pyx_mstate_global->__pyx_ptype_5numpy_broadcast
    4432             : #define __pyx_ptype_5numpy_ndarray __pyx_mstate_global->__pyx_ptype_5numpy_ndarray
    4433             : #define __pyx_ptype_5numpy_generic __pyx_mstate_global->__pyx_ptype_5numpy_generic
    4434             : #define __pyx_ptype_5numpy_number __pyx_mstate_global->__pyx_ptype_5numpy_number
    4435             : #define __pyx_ptype_5numpy_integer __pyx_mstate_global->__pyx_ptype_5numpy_integer
    4436             : #define __pyx_ptype_5numpy_signedinteger __pyx_mstate_global->__pyx_ptype_5numpy_signedinteger
    4437             : #define __pyx_ptype_5numpy_unsignedinteger __pyx_mstate_global->__pyx_ptype_5numpy_unsignedinteger
    4438             : #define __pyx_ptype_5numpy_inexact __pyx_mstate_global->__pyx_ptype_5numpy_inexact
    4439             : #define __pyx_ptype_5numpy_floating __pyx_mstate_global->__pyx_ptype_5numpy_floating
    4440             : #define __pyx_ptype_5numpy_complexfloating __pyx_mstate_global->__pyx_ptype_5numpy_complexfloating
    4441             : #define __pyx_ptype_5numpy_flexible __pyx_mstate_global->__pyx_ptype_5numpy_flexible
    4442             : #define __pyx_ptype_5numpy_character __pyx_mstate_global->__pyx_ptype_5numpy_character
    4443             : #define __pyx_ptype_5numpy_ufunc __pyx_mstate_global->__pyx_ptype_5numpy_ufunc
    4444             : #if CYTHON_USE_MODULE_STATE
    4445             : #endif
    4446             : #if CYTHON_USE_MODULE_STATE
    4447             : #define __pyx_type___pyx_array __pyx_mstate_global->__pyx_type___pyx_array
    4448             : #define __pyx_type___pyx_MemviewEnum __pyx_mstate_global->__pyx_type___pyx_MemviewEnum
    4449             : #define __pyx_type___pyx_memoryview __pyx_mstate_global->__pyx_type___pyx_memoryview
    4450             : #define __pyx_type___pyx_memoryviewslice __pyx_mstate_global->__pyx_type___pyx_memoryviewslice
    4451             : #endif
    4452             : #define __pyx_array_type __pyx_mstate_global->__pyx_array_type
    4453             : #define __pyx_MemviewEnum_type __pyx_mstate_global->__pyx_MemviewEnum_type
    4454             : #define __pyx_memoryview_type __pyx_mstate_global->__pyx_memoryview_type
    4455             : #define __pyx_memoryviewslice_type __pyx_mstate_global->__pyx_memoryviewslice_type
    4456             : #define __pyx_kp_u_ __pyx_mstate_global->__pyx_kp_u_
    4457             : #define __pyx_n_s_ASCII __pyx_mstate_global->__pyx_n_s_ASCII
    4458             : #define __pyx_kp_s_All_dimensions_preceding_dimensi __pyx_mstate_global->__pyx_kp_s_All_dimensions_preceding_dimensi
    4459             : #define __pyx_n_s_AssertionError __pyx_mstate_global->__pyx_n_s_AssertionError
    4460             : #define __pyx_n_s_BTYPE __pyx_mstate_global->__pyx_n_s_BTYPE
    4461             : #define __pyx_kp_s_Buffer_view_does_not_expose_stri __pyx_mstate_global->__pyx_kp_s_Buffer_view_does_not_expose_stri
    4462             : #define __pyx_kp_s_Can_only_create_a_buffer_that_is __pyx_mstate_global->__pyx_kp_s_Can_only_create_a_buffer_that_is
    4463             : #define __pyx_kp_s_Cannot_assign_to_read_only_memor __pyx_mstate_global->__pyx_kp_s_Cannot_assign_to_read_only_memor
    4464             : #define __pyx_kp_s_Cannot_create_writable_memory_vi __pyx_mstate_global->__pyx_kp_s_Cannot_create_writable_memory_vi
    4465             : #define __pyx_kp_u_Cannot_index_with_type __pyx_mstate_global->__pyx_kp_u_Cannot_index_with_type
    4466             : #define __pyx_kp_s_Cannot_transpose_memoryview_with __pyx_mstate_global->__pyx_kp_s_Cannot_transpose_memoryview_with
    4467             : #define __pyx_n_s_DTYPE __pyx_mstate_global->__pyx_n_s_DTYPE
    4468             : #define __pyx_kp_s_Dimension_d_is_not_direct __pyx_mstate_global->__pyx_kp_s_Dimension_d_is_not_direct
    4469             : #define __pyx_n_s_Ellipsis __pyx_mstate_global->__pyx_n_s_Ellipsis
    4470             : #define __pyx_kp_s_Empty_shape_tuple_for_cython_arr __pyx_mstate_global->__pyx_kp_s_Empty_shape_tuple_for_cython_arr
    4471             : #define __pyx_n_s_ITYPE __pyx_mstate_global->__pyx_n_s_ITYPE
    4472             : #define __pyx_n_s_ImportError __pyx_mstate_global->__pyx_n_s_ImportError
    4473             : #define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0
    4474             : #define __pyx_n_s_IndexError __pyx_mstate_global->__pyx_n_s_IndexError
    4475             : #define __pyx_kp_s_Index_out_of_bounds_axis_d __pyx_mstate_global->__pyx_kp_s_Index_out_of_bounds_axis_d
    4476             : #define __pyx_kp_s_Indirect_dimensions_not_supporte __pyx_mstate_global->__pyx_kp_s_Indirect_dimensions_not_supporte
    4477             : #define __pyx_kp_u_Invalid_mode_expected_c_or_fortr __pyx_mstate_global->__pyx_kp_u_Invalid_mode_expected_c_or_fortr
    4478             : #define __pyx_kp_u_Invalid_shape_in_axis __pyx_mstate_global->__pyx_kp_u_Invalid_shape_in_axis
    4479             : #define __pyx_n_s_MemoryError __pyx_mstate_global->__pyx_n_s_MemoryError
    4480             : #define __pyx_kp_s_MemoryView_of_r_at_0x_x __pyx_mstate_global->__pyx_kp_s_MemoryView_of_r_at_0x_x
    4481             : #define __pyx_kp_s_MemoryView_of_r_object __pyx_mstate_global->__pyx_kp_s_MemoryView_of_r_object
    4482             : #define __pyx_n_b_O __pyx_mstate_global->__pyx_n_b_O
    4483             : #define __pyx_kp_u_Out_of_bounds_on_buffer_access_a __pyx_mstate_global->__pyx_kp_u_Out_of_bounds_on_buffer_access_a
    4484             : #define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError
    4485             : #define __pyx_n_s_Sequence __pyx_mstate_global->__pyx_n_s_Sequence
    4486             : #define __pyx_kp_s_Step_may_not_be_zero_axis_d __pyx_mstate_global->__pyx_kp_s_Step_may_not_be_zero_axis_d
    4487             : #define __pyx_n_s_T __pyx_mstate_global->__pyx_n_s_T
    4488             : #define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError
    4489             : #define __pyx_kp_s_Unable_to_convert_item_to_object __pyx_mstate_global->__pyx_kp_s_Unable_to_convert_item_to_object
    4490             : #define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
    4491             : #define __pyx_n_s_View_MemoryView __pyx_mstate_global->__pyx_n_s_View_MemoryView
    4492             : #define __pyx_kp_u__2 __pyx_mstate_global->__pyx_kp_u__2
    4493             : #define __pyx_n_s__28 __pyx_mstate_global->__pyx_n_s__28
    4494             : #define __pyx_n_s__3 __pyx_mstate_global->__pyx_n_s__3
    4495             : #define __pyx_n_s__32 __pyx_mstate_global->__pyx_n_s__32
    4496             : #define __pyx_kp_u__6 __pyx_mstate_global->__pyx_kp_u__6
    4497             : #define __pyx_kp_u__7 __pyx_mstate_global->__pyx_kp_u__7
    4498             : #define __pyx_n_s_a __pyx_mstate_global->__pyx_n_s_a
    4499             : #define __pyx_n_s_abc __pyx_mstate_global->__pyx_n_s_abc
    4500             : #define __pyx_n_s_all __pyx_mstate_global->__pyx_n_s_all
    4501             : #define __pyx_n_s_allocate_buffer __pyx_mstate_global->__pyx_n_s_allocate_buffer
    4502             : #define __pyx_kp_u_and __pyx_mstate_global->__pyx_kp_u_and
    4503             : #define __pyx_n_s_arange __pyx_mstate_global->__pyx_n_s_arange
    4504             : #define __pyx_n_s_argsort __pyx_mstate_global->__pyx_n_s_argsort
    4505             : #define __pyx_n_s_asarray __pyx_mstate_global->__pyx_n_s_asarray
    4506             : #define __pyx_n_s_astype __pyx_mstate_global->__pyx_n_s_astype
    4507             : #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
    4508             : #define __pyx_n_s_b __pyx_mstate_global->__pyx_n_s_b
    4509             : #define __pyx_n_s_base __pyx_mstate_global->__pyx_n_s_base
    4510             : #define __pyx_n_s_biadj_indices __pyx_mstate_global->__pyx_n_s_biadj_indices
    4511             : #define __pyx_n_s_biadj_indptr __pyx_mstate_global->__pyx_n_s_biadj_indptr
    4512             : #define __pyx_n_s_biadjacency __pyx_mstate_global->__pyx_n_s_biadjacency
    4513             : #define __pyx_n_s_biadjacency_t __pyx_mstate_global->__pyx_n_s_biadjacency_t
    4514             : #define __pyx_n_s_bool __pyx_mstate_global->__pyx_n_s_bool
    4515             : #define __pyx_n_s_c __pyx_mstate_global->__pyx_n_s_c
    4516             : #define __pyx_n_u_c __pyx_mstate_global->__pyx_n_u_c
    4517             : #define __pyx_n_s_class __pyx_mstate_global->__pyx_n_s_class
    4518             : #define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem
    4519             : #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
    4520             : #define __pyx_n_s_collections __pyx_mstate_global->__pyx_n_s_collections
    4521             : #define __pyx_kp_s_collections_abc __pyx_mstate_global->__pyx_kp_s_collections_abc
    4522             : #define __pyx_n_u_column __pyx_mstate_global->__pyx_n_u_column
    4523             : #define __pyx_kp_s_contiguous_and_direct __pyx_mstate_global->__pyx_kp_s_contiguous_and_direct
    4524             : #define __pyx_kp_s_contiguous_and_indirect __pyx_mstate_global->__pyx_kp_s_contiguous_and_indirect
    4525             : #define __pyx_n_s_convert_pydata_sparse_to_scipy __pyx_mstate_global->__pyx_n_s_convert_pydata_sparse_to_scipy
    4526             : #define __pyx_n_u_coo __pyx_mstate_global->__pyx_n_u_coo
    4527             : #define __pyx_n_s_count __pyx_mstate_global->__pyx_n_s_count
    4528             : #define __pyx_n_u_csc __pyx_mstate_global->__pyx_n_u_csc
    4529             : #define __pyx_n_u_csr __pyx_mstate_global->__pyx_n_u_csr
    4530             : #define __pyx_n_s_csr_array __pyx_mstate_global->__pyx_n_s_csr_array
    4531             : #define __pyx_n_s_data __pyx_mstate_global->__pyx_n_s_data
    4532             : #define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
    4533             : #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
    4534             : #define __pyx_n_s_double __pyx_mstate_global->__pyx_n_s_double
    4535             : #define __pyx_n_s_dtype __pyx_mstate_global->__pyx_n_s_dtype
    4536             : #define __pyx_n_s_dtype_is_object __pyx_mstate_global->__pyx_n_s_dtype_is_object
    4537             : #define __pyx_n_s_eliminate_zeros __pyx_mstate_global->__pyx_n_s_eliminate_zeros
    4538             : #define __pyx_n_s_empty __pyx_mstate_global->__pyx_n_s_empty
    4539             : #define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
    4540             : #define __pyx_n_s_encode __pyx_mstate_global->__pyx_n_s_encode
    4541             : #define __pyx_n_s_enumerate __pyx_mstate_global->__pyx_n_s_enumerate
    4542             : #define __pyx_n_s_error __pyx_mstate_global->__pyx_n_s_error
    4543             : #define __pyx_kp_u_expected_a_matrix_containing_num __pyx_mstate_global->__pyx_kp_u_expected_a_matrix_containing_num
    4544             : #define __pyx_kp_u_explicit_zero_weights_are_remove __pyx_mstate_global->__pyx_kp_u_explicit_zero_weights_are_remove
    4545             : #define __pyx_n_s_flags __pyx_mstate_global->__pyx_n_s_flags
    4546             : #define __pyx_n_s_float64 __pyx_mstate_global->__pyx_n_s_float64
    4547             : #define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format
    4548             : #define __pyx_n_s_fortran __pyx_mstate_global->__pyx_n_s_fortran
    4549             : #define __pyx_n_u_fortran __pyx_mstate_global->__pyx_n_u_fortran
    4550             : #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
    4551             : #define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate
    4552             : #define __pyx_kp_u_got __pyx_mstate_global->__pyx_kp_u_got
    4553             : #define __pyx_kp_u_got_2 __pyx_mstate_global->__pyx_kp_u_got_2
    4554             : #define __pyx_kp_u_got_differing_extents_in_dimensi __pyx_mstate_global->__pyx_kp_u_got_differing_extents_in_dimensi
    4555             : #define __pyx_n_s_graph __pyx_mstate_global->__pyx_n_s_graph
    4556             : #define __pyx_kp_u_graph_must_be_in_CSC_CSR_or_COO __pyx_mstate_global->__pyx_kp_u_graph_must_be_in_CSC_CSR_or_COO
    4557             : #define __pyx_kp_u_graph_must_be_sparse __pyx_mstate_global->__pyx_kp_u_graph_must_be_sparse
    4558             : #define __pyx_kp_s_home_czgdp18079_Quansight_scipy __pyx_mstate_global->__pyx_kp_s_home_czgdp18079_Quansight_scipy
    4559             : #define __pyx_n_s_i __pyx_mstate_global->__pyx_n_s_i
    4560             : #define __pyx_n_s_id __pyx_mstate_global->__pyx_n_s_id
    4561             : #define __pyx_n_s_iinfo __pyx_mstate_global->__pyx_n_s_iinfo
    4562             : #define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
    4563             : #define __pyx_n_s_index __pyx_mstate_global->__pyx_n_s_index
    4564             : #define __pyx_n_s_indices __pyx_mstate_global->__pyx_n_s_indices
    4565             : #define __pyx_n_s_indptr __pyx_mstate_global->__pyx_n_s_indptr
    4566             : #define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing
    4567             : #define __pyx_n_s_int32 __pyx_mstate_global->__pyx_n_s_int32
    4568             : #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
    4569             : #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled
    4570             : #define __pyx_n_s_isposinf __pyx_mstate_global->__pyx_n_s_isposinf
    4571             : #define __pyx_n_s_issparse __pyx_mstate_global->__pyx_n_s_issparse
    4572             : #define __pyx_n_s_issubdtype __pyx_mstate_global->__pyx_n_s_issubdtype
    4573             : #define __pyx_n_s_itemsize __pyx_mstate_global->__pyx_n_s_itemsize
    4574             : #define __pyx_kp_s_itemsize_0_for_cython_array __pyx_mstate_global->__pyx_kp_s_itemsize_0_for_cython_array
    4575             : #define __pyx_n_s_j __pyx_mstate_global->__pyx_n_s_j
    4576             : #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
    4577             : #define __pyx_n_s_matching __pyx_mstate_global->__pyx_n_s_matching
    4578             : #define __pyx_n_s_max __pyx_mstate_global->__pyx_n_s_max
    4579             : #define __pyx_n_s_maximize __pyx_mstate_global->__pyx_n_s_maximize
    4580             : #define __pyx_n_s_maximum_bipartite_matching __pyx_mstate_global->__pyx_n_s_maximum_bipartite_matching
    4581             : #define __pyx_kp_u_maximum_bipartite_matching_grap __pyx_mstate_global->__pyx_kp_u_maximum_bipartite_matching_grap
    4582             : #define __pyx_kp_u_maximum_bipartite_matching_line __pyx_mstate_global->__pyx_kp_u_maximum_bipartite_matching_line
    4583             : #define __pyx_n_s_memview __pyx_mstate_global->__pyx_n_s_memview
    4584             : #define __pyx_n_s_min __pyx_mstate_global->__pyx_n_s_min
    4585             : #define __pyx_kp_u_min_weight_full_bipartite_match __pyx_mstate_global->__pyx_kp_u_min_weight_full_bipartite_match
    4586             : #define __pyx_n_s_min_weight_full_bipartite_matchi __pyx_mstate_global->__pyx_n_s_min_weight_full_bipartite_matchi
    4587             : #define __pyx_kp_u_min_weight_full_bipartite_matchi_2 __pyx_mstate_global->__pyx_kp_u_min_weight_full_bipartite_matchi_2
    4588             : #define __pyx_n_s_mode __pyx_mstate_global->__pyx_n_s_mode
    4589             : #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
    4590             : #define __pyx_n_s_name_2 __pyx_mstate_global->__pyx_n_s_name_2
    4591             : #define __pyx_n_s_ndim __pyx_mstate_global->__pyx_n_s_ndim
    4592             : #define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new
    4593             : #define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non
    4594             : #define __pyx_kp_u_no_full_matching_exists __pyx_mstate_global->__pyx_kp_u_no_full_matching_exists
    4595             : #define __pyx_n_s_np __pyx_mstate_global->__pyx_n_s_np
    4596             : #define __pyx_n_s_numpy __pyx_mstate_global->__pyx_n_s_numpy
    4597             : #define __pyx_kp_u_numpy__core_multiarray_failed_to __pyx_mstate_global->__pyx_kp_u_numpy__core_multiarray_failed_to
    4598             : #define __pyx_kp_u_numpy__core_umath_failed_to_impo __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo
    4599             : #define __pyx_n_s_obj __pyx_mstate_global->__pyx_n_s_obj
    4600             : #define __pyx_n_s_pack __pyx_mstate_global->__pyx_n_s_pack
    4601             : #define __pyx_n_s_perm_type __pyx_mstate_global->__pyx_n_s_perm_type
    4602             : #define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle
    4603             : #define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError
    4604             : #define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum
    4605             : #define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result
    4606             : #define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state
    4607             : #define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type
    4608             : #define __pyx_n_s_pyx_unpickle_Enum __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Enum
    4609             : #define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable
    4610             : #define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range
    4611             : #define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce
    4612             : #define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython
    4613             : #define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex
    4614             : #define __pyx_n_s_register __pyx_mstate_global->__pyx_n_s_register
    4615             : #define __pyx_n_u_row __pyx_mstate_global->__pyx_n_u_row
    4616             : #define __pyx_n_s_safe_downcast_indices __pyx_mstate_global->__pyx_n_s_safe_downcast_indices
    4617             : #define __pyx_n_s_scipy_sparse __pyx_mstate_global->__pyx_n_s_scipy_sparse
    4618             : #define __pyx_n_s_scipy_sparse__sputils __pyx_mstate_global->__pyx_n_s_scipy_sparse__sputils
    4619             : #define __pyx_n_s_scipy_sparse_csgraph__matching __pyx_mstate_global->__pyx_n_s_scipy_sparse_csgraph__matching
    4620             : #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate
    4621             : #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython
    4622             : #define __pyx_n_s_shape __pyx_mstate_global->__pyx_n_s_shape
    4623             : #define __pyx_n_s_size __pyx_mstate_global->__pyx_n_s_size
    4624             : #define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec
    4625             : #define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start
    4626             : #define __pyx_n_s_step __pyx_mstate_global->__pyx_n_s_step
    4627             : #define __pyx_n_s_stop __pyx_mstate_global->__pyx_n_s_stop
    4628             : #define __pyx_kp_s_strided_and_direct __pyx_mstate_global->__pyx_kp_s_strided_and_direct
    4629             : #define __pyx_kp_s_strided_and_direct_or_indirect __pyx_mstate_global->__pyx_kp_s_strided_and_direct_or_indirect
    4630             : #define __pyx_kp_s_strided_and_indirect __pyx_mstate_global->__pyx_kp_s_strided_and_indirect
    4631             : #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource
    4632             : #define __pyx_n_s_struct __pyx_mstate_global->__pyx_n_s_struct
    4633             : #define __pyx_n_s_sum __pyx_mstate_global->__pyx_n_s_sum
    4634             : #define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys
    4635             : #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
    4636             : #define __pyx_n_s_tocsr __pyx_mstate_global->__pyx_n_s_tocsr
    4637             : #define __pyx_n_s_tools __pyx_mstate_global->__pyx_n_s_tools
    4638             : #define __pyx_n_s_uint8 __pyx_mstate_global->__pyx_n_s_uint8
    4639             : #define __pyx_kp_s_unable_to_allocate_array_data __pyx_mstate_global->__pyx_kp_s_unable_to_allocate_array_data
    4640             : #define __pyx_kp_s_unable_to_allocate_shape_and_str __pyx_mstate_global->__pyx_kp_s_unable_to_allocate_shape_and_str
    4641             : #define __pyx_n_s_unpack __pyx_mstate_global->__pyx_n_s_unpack
    4642             : #define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update
    4643             : #define __pyx_n_s_version_info __pyx_mstate_global->__pyx_n_s_version_info
    4644             : #define __pyx_n_s_warn __pyx_mstate_global->__pyx_n_s_warn
    4645             : #define __pyx_n_s_warnings __pyx_mstate_global->__pyx_n_s_warnings
    4646             : #define __pyx_n_s_x __pyx_mstate_global->__pyx_n_s_x
    4647             : #define __pyx_n_s_y __pyx_mstate_global->__pyx_n_s_y
    4648             : #define __pyx_n_s_zeros __pyx_mstate_global->__pyx_n_s_zeros
    4649             : #define __pyx_int_0 __pyx_mstate_global->__pyx_int_0
    4650             : #define __pyx_int_1 __pyx_mstate_global->__pyx_int_1
    4651             : #define __pyx_int_3 __pyx_mstate_global->__pyx_int_3
    4652             : #define __pyx_int_112105877 __pyx_mstate_global->__pyx_int_112105877
    4653             : #define __pyx_int_136983863 __pyx_mstate_global->__pyx_int_136983863
    4654             : #define __pyx_int_184977713 __pyx_mstate_global->__pyx_int_184977713
    4655             : #define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1
    4656             : #define __pyx_slice__5 __pyx_mstate_global->__pyx_slice__5
    4657             : #define __pyx_tuple__4 __pyx_mstate_global->__pyx_tuple__4
    4658             : #define __pyx_tuple__8 __pyx_mstate_global->__pyx_tuple__8
    4659             : #define __pyx_tuple__9 __pyx_mstate_global->__pyx_tuple__9
    4660             : #define __pyx_tuple__10 __pyx_mstate_global->__pyx_tuple__10
    4661             : #define __pyx_tuple__11 __pyx_mstate_global->__pyx_tuple__11
    4662             : #define __pyx_tuple__12 __pyx_mstate_global->__pyx_tuple__12
    4663             : #define __pyx_tuple__13 __pyx_mstate_global->__pyx_tuple__13
    4664             : #define __pyx_tuple__14 __pyx_mstate_global->__pyx_tuple__14
    4665             : #define __pyx_tuple__15 __pyx_mstate_global->__pyx_tuple__15
    4666             : #define __pyx_tuple__16 __pyx_mstate_global->__pyx_tuple__16
    4667             : #define __pyx_tuple__17 __pyx_mstate_global->__pyx_tuple__17
    4668             : #define __pyx_tuple__18 __pyx_mstate_global->__pyx_tuple__18
    4669             : #define __pyx_tuple__19 __pyx_mstate_global->__pyx_tuple__19
    4670             : #define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20
    4671             : #define __pyx_tuple__21 __pyx_mstate_global->__pyx_tuple__21
    4672             : #define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22
    4673             : #define __pyx_tuple__23 __pyx_mstate_global->__pyx_tuple__23
    4674             : #define __pyx_tuple__25 __pyx_mstate_global->__pyx_tuple__25
    4675             : #define __pyx_tuple__27 __pyx_mstate_global->__pyx_tuple__27
    4676             : #define __pyx_tuple__29 __pyx_mstate_global->__pyx_tuple__29
    4677             : #define __pyx_tuple__31 __pyx_mstate_global->__pyx_tuple__31
    4678             : #define __pyx_codeobj__24 __pyx_mstate_global->__pyx_codeobj__24
    4679             : #define __pyx_codeobj__26 __pyx_mstate_global->__pyx_codeobj__26
    4680             : #define __pyx_codeobj__30 __pyx_mstate_global->__pyx_codeobj__30
    4681             : /* #### Code section: module_code ### */
    4682             : 
    4683             : /* "View.MemoryView":131
    4684             :  *         cdef bint dtype_is_object
    4685             :  * 
    4686             :  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
    4687             :  *                   mode="c", bint allocate_buffer=True):
    4688             :  * 
    4689             :  */
    4690             : 
    4691             : /* Python wrapper */
    4692             : static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    4693           0 : static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    4694           0 :   PyObject *__pyx_v_shape = 0;
    4695           0 :   Py_ssize_t __pyx_v_itemsize;
    4696           0 :   PyObject *__pyx_v_format = 0;
    4697           0 :   PyObject *__pyx_v_mode = 0;
    4698           0 :   int __pyx_v_allocate_buffer;
    4699           0 :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    4700           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    4701           0 :   PyObject* values[5] = {0,0,0,0,0};
    4702           0 :   int __pyx_lineno = 0;
    4703           0 :   const char *__pyx_filename = NULL;
    4704           0 :   int __pyx_clineno = 0;
    4705           0 :   int __pyx_r;
    4706             :   __Pyx_RefNannyDeclarations
    4707           0 :   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
    4708             :   #if CYTHON_ASSUME_SAFE_MACROS
    4709           0 :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    4710             :   #else
    4711             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
    4712             :   #endif
    4713           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    4714             :   {
    4715           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};
    4716           0 :     values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_s_c));
    4717           0 :     if (__pyx_kwds) {
    4718           0 :       Py_ssize_t kw_args;
    4719           0 :       switch (__pyx_nargs) {
    4720           0 :         case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
    4721           0 :         CYTHON_FALLTHROUGH;
    4722           0 :         case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
    4723           0 :         CYTHON_FALLTHROUGH;
    4724           0 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
    4725           0 :         CYTHON_FALLTHROUGH;
    4726           0 :         case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    4727           0 :         CYTHON_FALLTHROUGH;
    4728           0 :         case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    4729           0 :         CYTHON_FALLTHROUGH;
    4730           0 :         case  0: break;
    4731           0 :         default: goto __pyx_L5_argtuple_error;
    4732             :       }
    4733           0 :       kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
    4734           0 :       switch (__pyx_nargs) {
    4735           0 :         case  0:
    4736           0 :         if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_shape)) != 0)) {
    4737           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
    4738           0 :           kw_args--;
    4739             :         }
    4740           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    4741           0 :         else goto __pyx_L5_argtuple_error;
    4742           0 :         CYTHON_FALLTHROUGH;
    4743             :         case  1:
    4744           0 :         if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_itemsize)) != 0)) {
    4745           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
    4746           0 :           kw_args--;
    4747             :         }
    4748           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    4749             :         else {
    4750           0 :           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(1, 131, __pyx_L3_error)
    4751             :         }
    4752           0 :         CYTHON_FALLTHROUGH;
    4753             :         case  2:
    4754           0 :         if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) {
    4755           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
    4756           0 :           kw_args--;
    4757             :         }
    4758           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    4759             :         else {
    4760           0 :           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(1, 131, __pyx_L3_error)
    4761             :         }
    4762           0 :         CYTHON_FALLTHROUGH;
    4763             :         case  3:
    4764           0 :         if (kw_args > 0) {
    4765           0 :           PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
    4766           0 :           if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
    4767           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    4768             :         }
    4769           0 :         CYTHON_FALLTHROUGH;
    4770             :         case  4:
    4771           0 :         if (kw_args > 0) {
    4772           0 :           PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_allocate_buffer);
    4773           0 :           if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
    4774           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    4775             :         }
    4776             :       }
    4777           0 :       if (unlikely(kw_args > 0)) {
    4778           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
    4779           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(1, 131, __pyx_L3_error)
    4780             :       }
    4781             :     } else {
    4782           0 :       switch (__pyx_nargs) {
    4783           0 :         case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
    4784           0 :         CYTHON_FALLTHROUGH;
    4785           0 :         case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
    4786           0 :         CYTHON_FALLTHROUGH;
    4787           0 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
    4788           0 :         values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    4789           0 :         values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    4790           0 :         break;
    4791           0 :         default: goto __pyx_L5_argtuple_error;
    4792             :       }
    4793             :     }
    4794           0 :     __pyx_v_shape = ((PyObject*)values[0]);
    4795           0 :     __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    4796           0 :     __pyx_v_format = values[2];
    4797           0 :     __pyx_v_mode = values[3];
    4798           0 :     if (values[4]) {
    4799           0 :       __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 132, __pyx_L3_error)
    4800             :     } else {
    4801             : 
    4802             :       /* "View.MemoryView":132
    4803             :  * 
    4804             :  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
    4805             :  *                   mode="c", bint allocate_buffer=True):             # <<<<<<<<<<<<<<
    4806             :  * 
    4807             :  *         cdef int idx
    4808             :  */
    4809             :       __pyx_v_allocate_buffer = ((int)1);
    4810             :     }
    4811             :   }
    4812           0 :   goto __pyx_L6_skip;
    4813           0 :   __pyx_L5_argtuple_error:;
    4814           0 :   __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, __pyx_nargs); __PYX_ERR(1, 131, __pyx_L3_error)
    4815           0 :   __pyx_L6_skip:;
    4816           0 :   goto __pyx_L4_argument_unpacking_done;
    4817           0 :   __pyx_L3_error:;
    4818             :   {
    4819           0 :     Py_ssize_t __pyx_temp;
    4820           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    4821             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    4822             :     }
    4823             :   }
    4824           0 :   __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    4825           0 :   __Pyx_RefNannyFinishContext();
    4826           0 :   return -1;
    4827           0 :   __pyx_L4_argument_unpacking_done:;
    4828           0 :   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 131, __pyx_L1_error)
    4829           0 :   if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
    4830           0 :     PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 131, __pyx_L1_error)
    4831             :   }
    4832           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);
    4833             : 
    4834             :   /* "View.MemoryView":131
    4835             :  *         cdef bint dtype_is_object
    4836             :  * 
    4837             :  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
    4838             :  *                   mode="c", bint allocate_buffer=True):
    4839             :  * 
    4840             :  */
    4841             : 
    4842             :   /* function exit code */
    4843           0 :   goto __pyx_L0;
    4844             :   __pyx_L1_error:;
    4845             :   __pyx_r = -1;
    4846           0 :   __pyx_L0:;
    4847             :   {
    4848           0 :     Py_ssize_t __pyx_temp;
    4849           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    4850             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    4851             :     }
    4852             :   }
    4853             :   __Pyx_RefNannyFinishContext();
    4854             :   return __pyx_r;
    4855             : }
    4856             : 
    4857           0 : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) {
    4858           0 :   int __pyx_v_idx;
    4859           0 :   Py_ssize_t __pyx_v_dim;
    4860           0 :   char __pyx_v_order;
    4861           0 :   int __pyx_r;
    4862             :   __Pyx_RefNannyDeclarations
    4863           0 :   Py_ssize_t __pyx_t_1;
    4864           0 :   int __pyx_t_2;
    4865           0 :   int __pyx_t_3;
    4866           0 :   PyObject *__pyx_t_4 = NULL;
    4867           0 :   PyObject *__pyx_t_5 = NULL;
    4868           0 :   PyObject *__pyx_t_6 = NULL;
    4869           0 :   unsigned int __pyx_t_7;
    4870           0 :   char *__pyx_t_8;
    4871           0 :   int __pyx_t_9;
    4872           0 :   Py_ssize_t __pyx_t_10;
    4873           0 :   Py_UCS4 __pyx_t_11;
    4874           0 :   int __pyx_lineno = 0;
    4875           0 :   const char *__pyx_filename = NULL;
    4876           0 :   int __pyx_clineno = 0;
    4877           0 :   __Pyx_RefNannySetupContext("__cinit__", 0);
    4878           0 :   __Pyx_INCREF(__pyx_v_format);
    4879             : 
    4880             :   /* "View.MemoryView":137
    4881             :  *         cdef Py_ssize_t dim
    4882             :  * 
    4883             :  *         self.ndim = <int> len(shape)             # <<<<<<<<<<<<<<
    4884             :  *         self.itemsize = itemsize
    4885             :  * 
    4886             :  */
    4887           0 :   if (unlikely(__pyx_v_shape == Py_None)) {
    4888           0 :     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    4889           0 :     __PYX_ERR(1, 137, __pyx_L1_error)
    4890             :   }
    4891           0 :   __pyx_t_1 = __Pyx_PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 137, __pyx_L1_error)
    4892           0 :   __pyx_v_self->ndim = ((int)__pyx_t_1);
    4893             : 
    4894             :   /* "View.MemoryView":138
    4895             :  * 
    4896             :  *         self.ndim = <int> len(shape)
    4897             :  *         self.itemsize = itemsize             # <<<<<<<<<<<<<<
    4898             :  * 
    4899             :  *         if not self.ndim:
    4900             :  */
    4901           0 :   __pyx_v_self->itemsize = __pyx_v_itemsize;
    4902             : 
    4903             :   /* "View.MemoryView":140
    4904             :  *         self.itemsize = itemsize
    4905             :  * 
    4906             :  *         if not self.ndim:             # <<<<<<<<<<<<<<
    4907             :  *             raise ValueError, "Empty shape tuple for cython.array"
    4908             :  * 
    4909             :  */
    4910           0 :   __pyx_t_2 = (!(__pyx_v_self->ndim != 0));
    4911           0 :   if (unlikely(__pyx_t_2)) {
    4912             : 
    4913             :     /* "View.MemoryView":141
    4914             :  * 
    4915             :  *         if not self.ndim:
    4916             :  *             raise ValueError, "Empty shape tuple for cython.array"             # <<<<<<<<<<<<<<
    4917             :  * 
    4918             :  *         if itemsize <= 0:
    4919             :  */
    4920           0 :     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Empty_shape_tuple_for_cython_arr, 0, 0);
    4921           0 :     __PYX_ERR(1, 141, __pyx_L1_error)
    4922             : 
    4923             :     /* "View.MemoryView":140
    4924             :  *         self.itemsize = itemsize
    4925             :  * 
    4926             :  *         if not self.ndim:             # <<<<<<<<<<<<<<
    4927             :  *             raise ValueError, "Empty shape tuple for cython.array"
    4928             :  * 
    4929             :  */
    4930             :   }
    4931             : 
    4932             :   /* "View.MemoryView":143
    4933             :  *             raise ValueError, "Empty shape tuple for cython.array"
    4934             :  * 
    4935             :  *         if itemsize <= 0:             # <<<<<<<<<<<<<<
    4936             :  *             raise ValueError, "itemsize <= 0 for cython.array"
    4937             :  * 
    4938             :  */
    4939           0 :   __pyx_t_2 = (__pyx_v_itemsize <= 0);
    4940           0 :   if (unlikely(__pyx_t_2)) {
    4941             : 
    4942             :     /* "View.MemoryView":144
    4943             :  * 
    4944             :  *         if itemsize <= 0:
    4945             :  *             raise ValueError, "itemsize <= 0 for cython.array"             # <<<<<<<<<<<<<<
    4946             :  * 
    4947             :  *         if not isinstance(format, bytes):
    4948             :  */
    4949           0 :     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_itemsize_0_for_cython_array, 0, 0);
    4950           0 :     __PYX_ERR(1, 144, __pyx_L1_error)
    4951             : 
    4952             :     /* "View.MemoryView":143
    4953             :  *             raise ValueError, "Empty shape tuple for cython.array"
    4954             :  * 
    4955             :  *         if itemsize <= 0:             # <<<<<<<<<<<<<<
    4956             :  *             raise ValueError, "itemsize <= 0 for cython.array"
    4957             :  * 
    4958             :  */
    4959             :   }
    4960             : 
    4961             :   /* "View.MemoryView":146
    4962             :  *             raise ValueError, "itemsize <= 0 for cython.array"
    4963             :  * 
    4964             :  *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
    4965             :  *             format = format.encode('ASCII')
    4966             :  *         self._format = format  # keep a reference to the byte string
    4967             :  */
    4968           0 :   __pyx_t_2 = PyBytes_Check(__pyx_v_format); 
    4969           0 :   __pyx_t_3 = (!__pyx_t_2);
    4970           0 :   if (__pyx_t_3) {
    4971             : 
    4972             :     /* "View.MemoryView":147
    4973             :  * 
    4974             :  *         if not isinstance(format, bytes):
    4975             :  *             format = format.encode('ASCII')             # <<<<<<<<<<<<<<
    4976             :  *         self._format = format  # keep a reference to the byte string
    4977             :  *         self.format = self._format
    4978             :  */
    4979           0 :     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 147, __pyx_L1_error)
    4980           0 :     __Pyx_GOTREF(__pyx_t_5);
    4981           0 :     __pyx_t_6 = NULL;
    4982           0 :     __pyx_t_7 = 0;
    4983             :     #if CYTHON_UNPACK_METHODS
    4984           0 :     if (likely(PyMethod_Check(__pyx_t_5))) {
    4985           0 :       __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    4986           0 :       if (likely(__pyx_t_6)) {
    4987           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
    4988           0 :         __Pyx_INCREF(__pyx_t_6);
    4989           0 :         __Pyx_INCREF(function);
    4990           0 :         __Pyx_DECREF_SET(__pyx_t_5, function);
    4991             :         __pyx_t_7 = 1;
    4992             :       }
    4993             :     }
    4994             :     #endif
    4995             :     {
    4996           0 :       PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_n_s_ASCII};
    4997           0 :       __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    4998           0 :       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    4999           0 :       if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 147, __pyx_L1_error)
    5000           0 :       __Pyx_GOTREF(__pyx_t_4);
    5001           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    5002             :     }
    5003           0 :     __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_4);
    5004             :     __pyx_t_4 = 0;
    5005             : 
    5006             :     /* "View.MemoryView":146
    5007             :  *             raise ValueError, "itemsize <= 0 for cython.array"
    5008             :  * 
    5009             :  *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
    5010             :  *             format = format.encode('ASCII')
    5011             :  *         self._format = format  # keep a reference to the byte string
    5012             :  */
    5013             :   }
    5014             : 
    5015             :   /* "View.MemoryView":148
    5016             :  *         if not isinstance(format, bytes):
    5017             :  *             format = format.encode('ASCII')
    5018             :  *         self._format = format  # keep a reference to the byte string             # <<<<<<<<<<<<<<
    5019             :  *         self.format = self._format
    5020             :  * 
    5021             :  */
    5022           0 :   if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_v_format))) __PYX_ERR(1, 148, __pyx_L1_error)
    5023           0 :   __pyx_t_4 = __pyx_v_format;
    5024           0 :   __Pyx_INCREF(__pyx_t_4);
    5025           0 :   __Pyx_GIVEREF(__pyx_t_4);
    5026           0 :   __Pyx_GOTREF(__pyx_v_self->_format);
    5027           0 :   __Pyx_DECREF(__pyx_v_self->_format);
    5028           0 :   __pyx_v_self->_format = ((PyObject*)__pyx_t_4);
    5029           0 :   __pyx_t_4 = 0;
    5030             : 
    5031             :   /* "View.MemoryView":149
    5032             :  *             format = format.encode('ASCII')
    5033             :  *         self._format = format  # keep a reference to the byte string
    5034             :  *         self.format = self._format             # <<<<<<<<<<<<<<
    5035             :  * 
    5036             :  * 
    5037             :  */
    5038           0 :   if (unlikely(__pyx_v_self->_format == Py_None)) {
    5039           0 :     PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    5040           0 :     __PYX_ERR(1, 149, __pyx_L1_error)
    5041             :   }
    5042           0 :   __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(1, 149, __pyx_L1_error)
    5043           0 :   __pyx_v_self->format = __pyx_t_8;
    5044             : 
    5045             :   /* "View.MemoryView":152
    5046             :  * 
    5047             :  * 
    5048             :  *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)             # <<<<<<<<<<<<<<
    5049             :  *         self._strides = self._shape + self.ndim
    5050             :  * 
    5051             :  */
    5052           0 :   __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));
    5053             : 
    5054             :   /* "View.MemoryView":153
    5055             :  * 
    5056             :  *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
    5057             :  *         self._strides = self._shape + self.ndim             # <<<<<<<<<<<<<<
    5058             :  * 
    5059             :  *         if not self._shape:
    5060             :  */
    5061           0 :   __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
    5062             : 
    5063             :   /* "View.MemoryView":155
    5064             :  *         self._strides = self._shape + self.ndim
    5065             :  * 
    5066             :  *         if not self._shape:             # <<<<<<<<<<<<<<
    5067             :  *             raise MemoryError, "unable to allocate shape and strides."
    5068             :  * 
    5069             :  */
    5070           0 :   __pyx_t_3 = (!(__pyx_v_self->_shape != 0));
    5071           0 :   if (unlikely(__pyx_t_3)) {
    5072             : 
    5073             :     /* "View.MemoryView":156
    5074             :  * 
    5075             :  *         if not self._shape:
    5076             :  *             raise MemoryError, "unable to allocate shape and strides."             # <<<<<<<<<<<<<<
    5077             :  * 
    5078             :  * 
    5079             :  */
    5080           0 :     __Pyx_Raise(__pyx_builtin_MemoryError, __pyx_kp_s_unable_to_allocate_shape_and_str, 0, 0);
    5081           0 :     __PYX_ERR(1, 156, __pyx_L1_error)
    5082             : 
    5083             :     /* "View.MemoryView":155
    5084             :  *         self._strides = self._shape + self.ndim
    5085             :  * 
    5086             :  *         if not self._shape:             # <<<<<<<<<<<<<<
    5087             :  *             raise MemoryError, "unable to allocate shape and strides."
    5088             :  * 
    5089             :  */
    5090             :   }
    5091             : 
    5092             :   /* "View.MemoryView":159
    5093             :  * 
    5094             :  * 
    5095             :  *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
    5096             :  *             if dim <= 0:
    5097             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
    5098             :  */
    5099           0 :   __pyx_t_9 = 0;
    5100           0 :   __pyx_t_4 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_4);
    5101             :   __pyx_t_1 = 0;
    5102           0 :   for (;;) {
    5103           0 :     {
    5104           0 :       Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
    5105             :       #if !CYTHON_ASSUME_SAFE_MACROS
    5106             :       if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 159, __pyx_L1_error)
    5107             :       #endif
    5108           0 :       if (__pyx_t_1 >= __pyx_temp) break;
    5109             :     }
    5110             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    5111           0 :     __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(1, 159, __pyx_L1_error)
    5112             :     #else
    5113             :     __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 159, __pyx_L1_error)
    5114             :     __Pyx_GOTREF(__pyx_t_5);
    5115             :     #endif
    5116           0 :     __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 159, __pyx_L1_error)
    5117           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    5118           0 :     __pyx_v_dim = __pyx_t_10;
    5119           0 :     __pyx_v_idx = __pyx_t_9;
    5120           0 :     __pyx_t_9 = (__pyx_t_9 + 1);
    5121             : 
    5122             :     /* "View.MemoryView":160
    5123             :  * 
    5124             :  *         for idx, dim in enumerate(shape):
    5125             :  *             if dim <= 0:             # <<<<<<<<<<<<<<
    5126             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
    5127             :  *             self._shape[idx] = dim
    5128             :  */
    5129           0 :     __pyx_t_3 = (__pyx_v_dim <= 0);
    5130           0 :     if (unlikely(__pyx_t_3)) {
    5131             : 
    5132             :       /* "View.MemoryView":161
    5133             :  *         for idx, dim in enumerate(shape):
    5134             :  *             if dim <= 0:
    5135             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."             # <<<<<<<<<<<<<<
    5136             :  *             self._shape[idx] = dim
    5137             :  * 
    5138             :  */
    5139           0 :       __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 161, __pyx_L1_error)
    5140           0 :       __Pyx_GOTREF(__pyx_t_5);
    5141           0 :       __pyx_t_10 = 0;
    5142           0 :       __pyx_t_11 = 127;
    5143           0 :       __Pyx_INCREF(__pyx_kp_u_Invalid_shape_in_axis);
    5144           0 :       __pyx_t_10 += 22;
    5145           0 :       __Pyx_GIVEREF(__pyx_kp_u_Invalid_shape_in_axis);
    5146           0 :       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Invalid_shape_in_axis);
    5147           0 :       __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_idx, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error)
    5148           0 :       __Pyx_GOTREF(__pyx_t_6);
    5149           0 :       __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    5150           0 :       __Pyx_GIVEREF(__pyx_t_6);
    5151           0 :       PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6);
    5152           0 :       __pyx_t_6 = 0;
    5153           0 :       __Pyx_INCREF(__pyx_kp_u_);
    5154           0 :       __pyx_t_10 += 2;
    5155           0 :       __Pyx_GIVEREF(__pyx_kp_u_);
    5156           0 :       PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_);
    5157           0 :       __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error)
    5158           0 :       __Pyx_GOTREF(__pyx_t_6);
    5159           0 :       __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    5160           0 :       __Pyx_GIVEREF(__pyx_t_6);
    5161           0 :       PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_6);
    5162           0 :       __pyx_t_6 = 0;
    5163           0 :       __Pyx_INCREF(__pyx_kp_u__2);
    5164           0 :       __pyx_t_10 += 1;
    5165           0 :       __Pyx_GIVEREF(__pyx_kp_u__2);
    5166           0 :       PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__2);
    5167           0 :       __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error)
    5168           0 :       __Pyx_GOTREF(__pyx_t_6);
    5169           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    5170           0 :       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0);
    5171           0 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    5172           0 :       __PYX_ERR(1, 161, __pyx_L1_error)
    5173             : 
    5174             :       /* "View.MemoryView":160
    5175             :  * 
    5176             :  *         for idx, dim in enumerate(shape):
    5177             :  *             if dim <= 0:             # <<<<<<<<<<<<<<
    5178             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
    5179             :  *             self._shape[idx] = dim
    5180             :  */
    5181             :     }
    5182             : 
    5183             :     /* "View.MemoryView":162
    5184             :  *             if dim <= 0:
    5185             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
    5186             :  *             self._shape[idx] = dim             # <<<<<<<<<<<<<<
    5187             :  * 
    5188             :  *         cdef char order
    5189             :  */
    5190           0 :     (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
    5191             : 
    5192             :     /* "View.MemoryView":159
    5193             :  * 
    5194             :  * 
    5195             :  *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
    5196             :  *             if dim <= 0:
    5197             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
    5198             :  */
    5199             :   }
    5200           0 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    5201             : 
    5202             :   /* "View.MemoryView":165
    5203             :  * 
    5204             :  *         cdef char order
    5205             :  *         if mode == 'c':             # <<<<<<<<<<<<<<
    5206             :  *             order = b'C'
    5207             :  *             self.mode = u'c'
    5208             :  */
    5209           0 :   __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 165, __pyx_L1_error)
    5210           0 :   if (__pyx_t_3) {
    5211             : 
    5212             :     /* "View.MemoryView":166
    5213             :  *         cdef char order
    5214             :  *         if mode == 'c':
    5215             :  *             order = b'C'             # <<<<<<<<<<<<<<
    5216             :  *             self.mode = u'c'
    5217             :  *         elif mode == 'fortran':
    5218             :  */
    5219           0 :     __pyx_v_order = 'C';
    5220             : 
    5221             :     /* "View.MemoryView":167
    5222             :  *         if mode == 'c':
    5223             :  *             order = b'C'
    5224             :  *             self.mode = u'c'             # <<<<<<<<<<<<<<
    5225             :  *         elif mode == 'fortran':
    5226             :  *             order = b'F'
    5227             :  */
    5228           0 :     __Pyx_INCREF(__pyx_n_u_c);
    5229           0 :     __Pyx_GIVEREF(__pyx_n_u_c);
    5230           0 :     __Pyx_GOTREF(__pyx_v_self->mode);
    5231           0 :     __Pyx_DECREF(__pyx_v_self->mode);
    5232           0 :     __pyx_v_self->mode = __pyx_n_u_c;
    5233             : 
    5234             :     /* "View.MemoryView":165
    5235             :  * 
    5236             :  *         cdef char order
    5237             :  *         if mode == 'c':             # <<<<<<<<<<<<<<
    5238             :  *             order = b'C'
    5239             :  *             self.mode = u'c'
    5240             :  */
    5241           0 :     goto __pyx_L11;
    5242             :   }
    5243             : 
    5244             :   /* "View.MemoryView":168
    5245             :  *             order = b'C'
    5246             :  *             self.mode = u'c'
    5247             :  *         elif mode == 'fortran':             # <<<<<<<<<<<<<<
    5248             :  *             order = b'F'
    5249             :  *             self.mode = u'fortran'
    5250             :  */
    5251           0 :   __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 168, __pyx_L1_error)
    5252           0 :   if (likely(__pyx_t_3)) {
    5253             : 
    5254             :     /* "View.MemoryView":169
    5255             :  *             self.mode = u'c'
    5256             :  *         elif mode == 'fortran':
    5257             :  *             order = b'F'             # <<<<<<<<<<<<<<
    5258             :  *             self.mode = u'fortran'
    5259             :  *         else:
    5260             :  */
    5261           0 :     __pyx_v_order = 'F';
    5262             : 
    5263             :     /* "View.MemoryView":170
    5264             :  *         elif mode == 'fortran':
    5265             :  *             order = b'F'
    5266             :  *             self.mode = u'fortran'             # <<<<<<<<<<<<<<
    5267             :  *         else:
    5268             :  *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"
    5269             :  */
    5270           0 :     __Pyx_INCREF(__pyx_n_u_fortran);
    5271           0 :     __Pyx_GIVEREF(__pyx_n_u_fortran);
    5272           0 :     __Pyx_GOTREF(__pyx_v_self->mode);
    5273           0 :     __Pyx_DECREF(__pyx_v_self->mode);
    5274           0 :     __pyx_v_self->mode = __pyx_n_u_fortran;
    5275             : 
    5276             :     /* "View.MemoryView":168
    5277             :  *             order = b'C'
    5278             :  *             self.mode = u'c'
    5279             :  *         elif mode == 'fortran':             # <<<<<<<<<<<<<<
    5280             :  *             order = b'F'
    5281             :  *             self.mode = u'fortran'
    5282             :  */
    5283           0 :     goto __pyx_L11;
    5284             :   }
    5285             : 
    5286             :   /* "View.MemoryView":172
    5287             :  *             self.mode = u'fortran'
    5288             :  *         else:
    5289             :  *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"             # <<<<<<<<<<<<<<
    5290             :  * 
    5291             :  *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)
    5292             :  */
    5293             :   /*else*/ {
    5294           0 :     __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 172, __pyx_L1_error)
    5295           0 :     __Pyx_GOTREF(__pyx_t_4);
    5296           0 :     __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 172, __pyx_L1_error)
    5297           0 :     __Pyx_GOTREF(__pyx_t_6);
    5298           0 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    5299           0 :     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0);
    5300           0 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    5301           0 :     __PYX_ERR(1, 172, __pyx_L1_error)
    5302             :   }
    5303           0 :   __pyx_L11:;
    5304             : 
    5305             :   /* "View.MemoryView":174
    5306             :  *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"
    5307             :  * 
    5308             :  *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)             # <<<<<<<<<<<<<<
    5309             :  * 
    5310             :  *         self.free_data = allocate_buffer
    5311             :  */
    5312           0 :   __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);
    5313             : 
    5314             :   /* "View.MemoryView":176
    5315             :  *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)
    5316             :  * 
    5317             :  *         self.free_data = allocate_buffer             # <<<<<<<<<<<<<<
    5318             :  *         self.dtype_is_object = format == b'O'
    5319             :  * 
    5320             :  */
    5321           0 :   __pyx_v_self->free_data = __pyx_v_allocate_buffer;
    5322             : 
    5323             :   /* "View.MemoryView":177
    5324             :  * 
    5325             :  *         self.free_data = allocate_buffer
    5326             :  *         self.dtype_is_object = format == b'O'             # <<<<<<<<<<<<<<
    5327             :  * 
    5328             :  *         if allocate_buffer:
    5329             :  */
    5330           0 :   __pyx_t_6 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 177, __pyx_L1_error)
    5331           0 :   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 177, __pyx_L1_error)
    5332           0 :   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    5333           0 :   __pyx_v_self->dtype_is_object = __pyx_t_3;
    5334             : 
    5335             :   /* "View.MemoryView":179
    5336             :  *         self.dtype_is_object = format == b'O'
    5337             :  * 
    5338             :  *         if allocate_buffer:             # <<<<<<<<<<<<<<
    5339             :  *             _allocate_buffer(self)
    5340             :  * 
    5341             :  */
    5342           0 :   if (__pyx_v_allocate_buffer) {
    5343             : 
    5344             :     /* "View.MemoryView":180
    5345             :  * 
    5346             :  *         if allocate_buffer:
    5347             :  *             _allocate_buffer(self)             # <<<<<<<<<<<<<<
    5348             :  * 
    5349             :  *     @cname('getbuffer')
    5350             :  */
    5351           0 :     __pyx_t_9 = __pyx_array_allocate_buffer(__pyx_v_self); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 180, __pyx_L1_error)
    5352             : 
    5353             :     /* "View.MemoryView":179
    5354             :  *         self.dtype_is_object = format == b'O'
    5355             :  * 
    5356             :  *         if allocate_buffer:             # <<<<<<<<<<<<<<
    5357             :  *             _allocate_buffer(self)
    5358             :  * 
    5359             :  */
    5360             :   }
    5361             : 
    5362             :   /* "View.MemoryView":131
    5363             :  *         cdef bint dtype_is_object
    5364             :  * 
    5365             :  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
    5366             :  *                   mode="c", bint allocate_buffer=True):
    5367             :  * 
    5368             :  */
    5369             : 
    5370             :   /* function exit code */
    5371           0 :   __pyx_r = 0;
    5372           0 :   goto __pyx_L0;
    5373           0 :   __pyx_L1_error:;
    5374           0 :   __Pyx_XDECREF(__pyx_t_4);
    5375           0 :   __Pyx_XDECREF(__pyx_t_5);
    5376           0 :   __Pyx_XDECREF(__pyx_t_6);
    5377           0 :   __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    5378           0 :   __pyx_r = -1;
    5379           0 :   __pyx_L0:;
    5380           0 :   __Pyx_XDECREF(__pyx_v_format);
    5381           0 :   __Pyx_RefNannyFinishContext();
    5382           0 :   return __pyx_r;
    5383             : }
    5384             : 
    5385             : /* "View.MemoryView":182
    5386             :  *             _allocate_buffer(self)
    5387             :  * 
    5388             :  *     @cname('getbuffer')             # <<<<<<<<<<<<<<
    5389             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    5390             :  *         cdef int bufmode = -1
    5391             :  */
    5392             : 
    5393             : /* Python wrapper */
    5394             : CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
    5395           0 : CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
    5396           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    5397           0 :   int __pyx_r;
    5398             :   __Pyx_RefNannyDeclarations
    5399           0 :   __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
    5400           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    5401           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
    5402             : 
    5403             :   /* function exit code */
    5404           0 :   __Pyx_RefNannyFinishContext();
    5405           0 :   return __pyx_r;
    5406             : }
    5407             : 
    5408           0 : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
    5409           0 :   int __pyx_v_bufmode;
    5410           0 :   int __pyx_r;
    5411             :   __Pyx_RefNannyDeclarations
    5412           0 :   int __pyx_t_1;
    5413           0 :   char *__pyx_t_2;
    5414           0 :   Py_ssize_t __pyx_t_3;
    5415           0 :   int __pyx_t_4;
    5416           0 :   Py_ssize_t *__pyx_t_5;
    5417           0 :   int __pyx_lineno = 0;
    5418           0 :   const char *__pyx_filename = NULL;
    5419           0 :   int __pyx_clineno = 0;
    5420           0 :   if (unlikely(__pyx_v_info == NULL)) {
    5421           0 :     PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    5422           0 :     return -1;
    5423             :   }
    5424           0 :   __Pyx_RefNannySetupContext("__getbuffer__", 0);
    5425           0 :   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
    5426           0 :   __Pyx_GIVEREF(__pyx_v_info->obj);
    5427             : 
    5428             :   /* "View.MemoryView":184
    5429             :  *     @cname('getbuffer')
    5430             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    5431             :  *         cdef int bufmode = -1             # <<<<<<<<<<<<<<
    5432             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
    5433             :  *             if self.mode == u"c":
    5434             :  */
    5435           0 :   __pyx_v_bufmode = -1;
    5436             : 
    5437             :   /* "View.MemoryView":185
    5438             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    5439             :  *         cdef int bufmode = -1
    5440             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):             # <<<<<<<<<<<<<<
    5441             :  *             if self.mode == u"c":
    5442             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5443             :  */
    5444           0 :   __pyx_t_1 = ((__pyx_v_flags & ((PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS) | PyBUF_ANY_CONTIGUOUS)) != 0);
    5445           0 :   if (__pyx_t_1) {
    5446             : 
    5447             :     /* "View.MemoryView":186
    5448             :  *         cdef int bufmode = -1
    5449             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
    5450             :  *             if self.mode == u"c":             # <<<<<<<<<<<<<<
    5451             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5452             :  *             elif self.mode == u"fortran":
    5453             :  */
    5454           0 :     __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 186, __pyx_L1_error)
    5455           0 :     if (__pyx_t_1) {
    5456             : 
    5457             :       /* "View.MemoryView":187
    5458             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
    5459             :  *             if self.mode == u"c":
    5460             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
    5461             :  *             elif self.mode == u"fortran":
    5462             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5463             :  */
    5464           0 :       __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
    5465             : 
    5466             :       /* "View.MemoryView":186
    5467             :  *         cdef int bufmode = -1
    5468             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
    5469             :  *             if self.mode == u"c":             # <<<<<<<<<<<<<<
    5470             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5471             :  *             elif self.mode == u"fortran":
    5472             :  */
    5473           0 :       goto __pyx_L4;
    5474             :     }
    5475             : 
    5476             :     /* "View.MemoryView":188
    5477             :  *             if self.mode == u"c":
    5478             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5479             :  *             elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
    5480             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5481             :  *             if not (flags & bufmode):
    5482             :  */
    5483           0 :     __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 188, __pyx_L1_error)
    5484           0 :     if (__pyx_t_1) {
    5485             : 
    5486             :       /* "View.MemoryView":189
    5487             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5488             :  *             elif self.mode == u"fortran":
    5489             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
    5490             :  *             if not (flags & bufmode):
    5491             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
    5492             :  */
    5493           0 :       __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
    5494             : 
    5495             :       /* "View.MemoryView":188
    5496             :  *             if self.mode == u"c":
    5497             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5498             :  *             elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
    5499             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5500             :  *             if not (flags & bufmode):
    5501             :  */
    5502             :     }
    5503           0 :     __pyx_L4:;
    5504             : 
    5505             :     /* "View.MemoryView":190
    5506             :  *             elif self.mode == u"fortran":
    5507             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5508             :  *             if not (flags & bufmode):             # <<<<<<<<<<<<<<
    5509             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
    5510             :  *         info.buf = self.data
    5511             :  */
    5512           0 :     __pyx_t_1 = (!((__pyx_v_flags & __pyx_v_bufmode) != 0));
    5513           0 :     if (unlikely(__pyx_t_1)) {
    5514             : 
    5515             :       /* "View.MemoryView":191
    5516             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5517             :  *             if not (flags & bufmode):
    5518             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."             # <<<<<<<<<<<<<<
    5519             :  *         info.buf = self.data
    5520             :  *         info.len = self.len
    5521             :  */
    5522           0 :       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Can_only_create_a_buffer_that_is, 0, 0);
    5523           0 :       __PYX_ERR(1, 191, __pyx_L1_error)
    5524             : 
    5525             :       /* "View.MemoryView":190
    5526             :  *             elif self.mode == u"fortran":
    5527             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5528             :  *             if not (flags & bufmode):             # <<<<<<<<<<<<<<
    5529             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
    5530             :  *         info.buf = self.data
    5531             :  */
    5532             :     }
    5533             : 
    5534             :     /* "View.MemoryView":185
    5535             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    5536             :  *         cdef int bufmode = -1
    5537             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):             # <<<<<<<<<<<<<<
    5538             :  *             if self.mode == u"c":
    5539             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5540             :  */
    5541             :   }
    5542             : 
    5543             :   /* "View.MemoryView":192
    5544             :  *             if not (flags & bufmode):
    5545             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
    5546             :  *         info.buf = self.data             # <<<<<<<<<<<<<<
    5547             :  *         info.len = self.len
    5548             :  * 
    5549             :  */
    5550           0 :   __pyx_t_2 = __pyx_v_self->data;
    5551           0 :   __pyx_v_info->buf = __pyx_t_2;
    5552             : 
    5553             :   /* "View.MemoryView":193
    5554             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
    5555             :  *         info.buf = self.data
    5556             :  *         info.len = self.len             # <<<<<<<<<<<<<<
    5557             :  * 
    5558             :  *         if flags & PyBUF_STRIDES:
    5559             :  */
    5560           0 :   __pyx_t_3 = __pyx_v_self->len;
    5561           0 :   __pyx_v_info->len = __pyx_t_3;
    5562             : 
    5563             :   /* "View.MemoryView":195
    5564             :  *         info.len = self.len
    5565             :  * 
    5566             :  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
    5567             :  *             info.ndim = self.ndim
    5568             :  *             info.shape = self._shape
    5569             :  */
    5570           0 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
    5571           0 :   if (__pyx_t_1) {
    5572             : 
    5573             :     /* "View.MemoryView":196
    5574             :  * 
    5575             :  *         if flags & PyBUF_STRIDES:
    5576             :  *             info.ndim = self.ndim             # <<<<<<<<<<<<<<
    5577             :  *             info.shape = self._shape
    5578             :  *             info.strides = self._strides
    5579             :  */
    5580           0 :     __pyx_t_4 = __pyx_v_self->ndim;
    5581           0 :     __pyx_v_info->ndim = __pyx_t_4;
    5582             : 
    5583             :     /* "View.MemoryView":197
    5584             :  *         if flags & PyBUF_STRIDES:
    5585             :  *             info.ndim = self.ndim
    5586             :  *             info.shape = self._shape             # <<<<<<<<<<<<<<
    5587             :  *             info.strides = self._strides
    5588             :  *         else:
    5589             :  */
    5590           0 :     __pyx_t_5 = __pyx_v_self->_shape;
    5591           0 :     __pyx_v_info->shape = __pyx_t_5;
    5592             : 
    5593             :     /* "View.MemoryView":198
    5594             :  *             info.ndim = self.ndim
    5595             :  *             info.shape = self._shape
    5596             :  *             info.strides = self._strides             # <<<<<<<<<<<<<<
    5597             :  *         else:
    5598             :  *             info.ndim = 1
    5599             :  */
    5600           0 :     __pyx_t_5 = __pyx_v_self->_strides;
    5601           0 :     __pyx_v_info->strides = __pyx_t_5;
    5602             : 
    5603             :     /* "View.MemoryView":195
    5604             :  *         info.len = self.len
    5605             :  * 
    5606             :  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
    5607             :  *             info.ndim = self.ndim
    5608             :  *             info.shape = self._shape
    5609             :  */
    5610           0 :     goto __pyx_L6;
    5611             :   }
    5612             : 
    5613             :   /* "View.MemoryView":200
    5614             :  *             info.strides = self._strides
    5615             :  *         else:
    5616             :  *             info.ndim = 1             # <<<<<<<<<<<<<<
    5617             :  *             info.shape = &self.len if flags & PyBUF_ND else NULL
    5618             :  *             info.strides = NULL
    5619             :  */
    5620             :   /*else*/ {
    5621           0 :     __pyx_v_info->ndim = 1;
    5622             : 
    5623             :     /* "View.MemoryView":201
    5624             :  *         else:
    5625             :  *             info.ndim = 1
    5626             :  *             info.shape = &self.len if flags & PyBUF_ND else NULL             # <<<<<<<<<<<<<<
    5627             :  *             info.strides = NULL
    5628             :  * 
    5629             :  */
    5630           0 :     __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
    5631           0 :     if (__pyx_t_1) {
    5632             :       __pyx_t_5 = (&__pyx_v_self->len);
    5633             :     } else {
    5634             :       __pyx_t_5 = NULL;
    5635             :     }
    5636           0 :     __pyx_v_info->shape = __pyx_t_5;
    5637             : 
    5638             :     /* "View.MemoryView":202
    5639             :  *             info.ndim = 1
    5640             :  *             info.shape = &self.len if flags & PyBUF_ND else NULL
    5641             :  *             info.strides = NULL             # <<<<<<<<<<<<<<
    5642             :  * 
    5643             :  *         info.suboffsets = NULL
    5644             :  */
    5645           0 :     __pyx_v_info->strides = NULL;
    5646             :   }
    5647           0 :   __pyx_L6:;
    5648             : 
    5649             :   /* "View.MemoryView":204
    5650             :  *             info.strides = NULL
    5651             :  * 
    5652             :  *         info.suboffsets = NULL             # <<<<<<<<<<<<<<
    5653             :  *         info.itemsize = self.itemsize
    5654             :  *         info.readonly = 0
    5655             :  */
    5656           0 :   __pyx_v_info->suboffsets = NULL;
    5657             : 
    5658             :   /* "View.MemoryView":205
    5659             :  * 
    5660             :  *         info.suboffsets = NULL
    5661             :  *         info.itemsize = self.itemsize             # <<<<<<<<<<<<<<
    5662             :  *         info.readonly = 0
    5663             :  *         info.format = self.format if flags & PyBUF_FORMAT else NULL
    5664             :  */
    5665           0 :   __pyx_t_3 = __pyx_v_self->itemsize;
    5666           0 :   __pyx_v_info->itemsize = __pyx_t_3;
    5667             : 
    5668             :   /* "View.MemoryView":206
    5669             :  *         info.suboffsets = NULL
    5670             :  *         info.itemsize = self.itemsize
    5671             :  *         info.readonly = 0             # <<<<<<<<<<<<<<
    5672             :  *         info.format = self.format if flags & PyBUF_FORMAT else NULL
    5673             :  *         info.obj = self
    5674             :  */
    5675           0 :   __pyx_v_info->readonly = 0;
    5676             : 
    5677             :   /* "View.MemoryView":207
    5678             :  *         info.itemsize = self.itemsize
    5679             :  *         info.readonly = 0
    5680             :  *         info.format = self.format if flags & PyBUF_FORMAT else NULL             # <<<<<<<<<<<<<<
    5681             :  *         info.obj = self
    5682             :  * 
    5683             :  */
    5684           0 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
    5685           0 :   if (__pyx_t_1) {
    5686           0 :     __pyx_t_2 = __pyx_v_self->format;
    5687             :   } else {
    5688             :     __pyx_t_2 = NULL;
    5689             :   }
    5690           0 :   __pyx_v_info->format = __pyx_t_2;
    5691             : 
    5692             :   /* "View.MemoryView":208
    5693             :  *         info.readonly = 0
    5694             :  *         info.format = self.format if flags & PyBUF_FORMAT else NULL
    5695             :  *         info.obj = self             # <<<<<<<<<<<<<<
    5696             :  * 
    5697             :  *     def __dealloc__(array self):
    5698             :  */
    5699           0 :   __Pyx_INCREF((PyObject *)__pyx_v_self);
    5700           0 :   __Pyx_GIVEREF((PyObject *)__pyx_v_self);
    5701           0 :   __Pyx_GOTREF(__pyx_v_info->obj);
    5702           0 :   __Pyx_DECREF(__pyx_v_info->obj);
    5703           0 :   __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
    5704             : 
    5705             :   /* "View.MemoryView":182
    5706             :  *             _allocate_buffer(self)
    5707             :  * 
    5708             :  *     @cname('getbuffer')             # <<<<<<<<<<<<<<
    5709             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    5710             :  *         cdef int bufmode = -1
    5711             :  */
    5712             : 
    5713             :   /* function exit code */
    5714           0 :   __pyx_r = 0;
    5715           0 :   goto __pyx_L0;
    5716           0 :   __pyx_L1_error:;
    5717           0 :   __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    5718           0 :   __pyx_r = -1;
    5719           0 :   if (__pyx_v_info->obj != NULL) {
    5720           0 :     __Pyx_GOTREF(__pyx_v_info->obj);
    5721           0 :     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
    5722             :   }
    5723           0 :   goto __pyx_L2;
    5724           0 :   __pyx_L0:;
    5725           0 :   if (__pyx_v_info->obj == Py_None) {
    5726           0 :     __Pyx_GOTREF(__pyx_v_info->obj);
    5727           0 :     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
    5728             :   }
    5729           0 :   __pyx_L2:;
    5730             :   __Pyx_RefNannyFinishContext();
    5731             :   return __pyx_r;
    5732             : }
    5733             : 
    5734             : /* "View.MemoryView":210
    5735             :  *         info.obj = self
    5736             :  * 
    5737             :  *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
    5738             :  *         if self.callback_free_data != NULL:
    5739             :  *             self.callback_free_data(self.data)
    5740             :  */
    5741             : 
    5742             : /* Python wrapper */
    5743             : static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
    5744           0 : static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
    5745           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    5746             :   __Pyx_RefNannyDeclarations
    5747           0 :   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
    5748           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    5749           0 :   __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));
    5750             : 
    5751             :   /* function exit code */
    5752           0 :   __Pyx_RefNannyFinishContext();
    5753             : }
    5754             : 
    5755           0 : static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
    5756           0 :   int __pyx_t_1;
    5757           0 :   int __pyx_t_2;
    5758             : 
    5759             :   /* "View.MemoryView":211
    5760             :  * 
    5761             :  *     def __dealloc__(array self):
    5762             :  *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
    5763             :  *             self.callback_free_data(self.data)
    5764             :  *         elif self.free_data and self.data is not NULL:
    5765             :  */
    5766           0 :   __pyx_t_1 = (__pyx_v_self->callback_free_data != NULL);
    5767           0 :   if (__pyx_t_1) {
    5768             : 
    5769             :     /* "View.MemoryView":212
    5770             :  *     def __dealloc__(array self):
    5771             :  *         if self.callback_free_data != NULL:
    5772             :  *             self.callback_free_data(self.data)             # <<<<<<<<<<<<<<
    5773             :  *         elif self.free_data and self.data is not NULL:
    5774             :  *             if self.dtype_is_object:
    5775             :  */
    5776           0 :     __pyx_v_self->callback_free_data(__pyx_v_self->data);
    5777             : 
    5778             :     /* "View.MemoryView":211
    5779             :  * 
    5780             :  *     def __dealloc__(array self):
    5781             :  *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
    5782             :  *             self.callback_free_data(self.data)
    5783             :  *         elif self.free_data and self.data is not NULL:
    5784             :  */
    5785           0 :     goto __pyx_L3;
    5786             :   }
    5787             : 
    5788             :   /* "View.MemoryView":213
    5789             :  *         if self.callback_free_data != NULL:
    5790             :  *             self.callback_free_data(self.data)
    5791             :  *         elif self.free_data and self.data is not NULL:             # <<<<<<<<<<<<<<
    5792             :  *             if self.dtype_is_object:
    5793             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    5794             :  */
    5795           0 :   if (__pyx_v_self->free_data) {
    5796           0 :   } else {
    5797           0 :     __pyx_t_1 = __pyx_v_self->free_data;
    5798           0 :     goto __pyx_L4_bool_binop_done;
    5799             :   }
    5800           0 :   __pyx_t_2 = (__pyx_v_self->data != NULL);
    5801           0 :   __pyx_t_1 = __pyx_t_2;
    5802           0 :   __pyx_L4_bool_binop_done:;
    5803           0 :   if (__pyx_t_1) {
    5804             : 
    5805             :     /* "View.MemoryView":214
    5806             :  *             self.callback_free_data(self.data)
    5807             :  *         elif self.free_data and self.data is not NULL:
    5808             :  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
    5809             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    5810             :  *             free(self.data)
    5811             :  */
    5812           0 :     if (__pyx_v_self->dtype_is_object) {
    5813             : 
    5814             :       /* "View.MemoryView":215
    5815             :  *         elif self.free_data and self.data is not NULL:
    5816             :  *             if self.dtype_is_object:
    5817             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)             # <<<<<<<<<<<<<<
    5818             :  *             free(self.data)
    5819             :  *         PyObject_Free(self._shape)
    5820             :  */
    5821           0 :       __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
    5822             : 
    5823             :       /* "View.MemoryView":214
    5824             :  *             self.callback_free_data(self.data)
    5825             :  *         elif self.free_data and self.data is not NULL:
    5826             :  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
    5827             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    5828             :  *             free(self.data)
    5829             :  */
    5830             :     }
    5831             : 
    5832             :     /* "View.MemoryView":216
    5833             :  *             if self.dtype_is_object:
    5834             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    5835             :  *             free(self.data)             # <<<<<<<<<<<<<<
    5836             :  *         PyObject_Free(self._shape)
    5837             :  * 
    5838             :  */
    5839           0 :     free(__pyx_v_self->data);
    5840             : 
    5841             :     /* "View.MemoryView":213
    5842             :  *         if self.callback_free_data != NULL:
    5843             :  *             self.callback_free_data(self.data)
    5844             :  *         elif self.free_data and self.data is not NULL:             # <<<<<<<<<<<<<<
    5845             :  *             if self.dtype_is_object:
    5846             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    5847             :  */
    5848             :   }
    5849           0 :   __pyx_L3:;
    5850             : 
    5851             :   /* "View.MemoryView":217
    5852             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    5853             :  *             free(self.data)
    5854             :  *         PyObject_Free(self._shape)             # <<<<<<<<<<<<<<
    5855             :  * 
    5856             :  *     @property
    5857             :  */
    5858           0 :   PyObject_Free(__pyx_v_self->_shape);
    5859             : 
    5860             :   /* "View.MemoryView":210
    5861             :  *         info.obj = self
    5862             :  * 
    5863             :  *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
    5864             :  *         if self.callback_free_data != NULL:
    5865             :  *             self.callback_free_data(self.data)
    5866             :  */
    5867             : 
    5868             :   /* function exit code */
    5869           0 : }
    5870             : 
    5871             : /* "View.MemoryView":219
    5872             :  *         PyObject_Free(self._shape)
    5873             :  * 
    5874             :  *     @property             # <<<<<<<<<<<<<<
    5875             :  *     def memview(self):
    5876             :  *         return self.get_memview()
    5877             :  */
    5878             : 
    5879             : /* Python wrapper */
    5880             : static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
    5881           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
    5882           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    5883           0 :   PyObject *__pyx_r = 0;
    5884             :   __Pyx_RefNannyDeclarations
    5885           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
    5886           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    5887           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));
    5888             : 
    5889             :   /* function exit code */
    5890           0 :   __Pyx_RefNannyFinishContext();
    5891           0 :   return __pyx_r;
    5892             : }
    5893             : 
    5894           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
    5895           0 :   PyObject *__pyx_r = NULL;
    5896             :   __Pyx_RefNannyDeclarations
    5897           0 :   PyObject *__pyx_t_1 = NULL;
    5898           0 :   int __pyx_lineno = 0;
    5899           0 :   const char *__pyx_filename = NULL;
    5900           0 :   int __pyx_clineno = 0;
    5901           0 :   __Pyx_RefNannySetupContext("__get__", 1);
    5902             : 
    5903             :   /* "View.MemoryView":221
    5904             :  *     @property
    5905             :  *     def memview(self):
    5906             :  *         return self.get_memview()             # <<<<<<<<<<<<<<
    5907             :  * 
    5908             :  *     @cname('get_memview')
    5909             :  */
    5910           0 :   __Pyx_XDECREF(__pyx_r);
    5911           0 :   __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 221, __pyx_L1_error)
    5912           0 :   __Pyx_GOTREF(__pyx_t_1);
    5913           0 :   __pyx_r = __pyx_t_1;
    5914           0 :   __pyx_t_1 = 0;
    5915           0 :   goto __pyx_L0;
    5916             : 
    5917             :   /* "View.MemoryView":219
    5918             :  *         PyObject_Free(self._shape)
    5919             :  * 
    5920             :  *     @property             # <<<<<<<<<<<<<<
    5921             :  *     def memview(self):
    5922             :  *         return self.get_memview()
    5923             :  */
    5924             : 
    5925             :   /* function exit code */
    5926           0 :   __pyx_L1_error:;
    5927           0 :   __Pyx_XDECREF(__pyx_t_1);
    5928           0 :   __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    5929           0 :   __pyx_r = NULL;
    5930           0 :   __pyx_L0:;
    5931           0 :   __Pyx_XGIVEREF(__pyx_r);
    5932           0 :   __Pyx_RefNannyFinishContext();
    5933           0 :   return __pyx_r;
    5934             : }
    5935             : 
    5936             : /* "View.MemoryView":224
    5937             :  * 
    5938             :  *     @cname('get_memview')
    5939             :  *     cdef get_memview(self):             # <<<<<<<<<<<<<<
    5940             :  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
    5941             :  *         return  memoryview(self, flags, self.dtype_is_object)
    5942             :  */
    5943             : 
    5944           0 : static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
    5945           0 :   int __pyx_v_flags;
    5946           0 :   PyObject *__pyx_r = NULL;
    5947             :   __Pyx_RefNannyDeclarations
    5948           0 :   PyObject *__pyx_t_1 = NULL;
    5949           0 :   PyObject *__pyx_t_2 = NULL;
    5950           0 :   PyObject *__pyx_t_3 = NULL;
    5951           0 :   int __pyx_lineno = 0;
    5952           0 :   const char *__pyx_filename = NULL;
    5953           0 :   int __pyx_clineno = 0;
    5954           0 :   __Pyx_RefNannySetupContext("get_memview", 1);
    5955             : 
    5956             :   /* "View.MemoryView":225
    5957             :  *     @cname('get_memview')
    5958             :  *     cdef get_memview(self):
    5959             :  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE             # <<<<<<<<<<<<<<
    5960             :  *         return  memoryview(self, flags, self.dtype_is_object)
    5961             :  * 
    5962             :  */
    5963           0 :   __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
    5964             : 
    5965             :   /* "View.MemoryView":226
    5966             :  *     cdef get_memview(self):
    5967             :  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
    5968             :  *         return  memoryview(self, flags, self.dtype_is_object)             # <<<<<<<<<<<<<<
    5969             :  * 
    5970             :  *     def __len__(self):
    5971             :  */
    5972           0 :   __Pyx_XDECREF(__pyx_r);
    5973           0 :   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 226, __pyx_L1_error)
    5974           0 :   __Pyx_GOTREF(__pyx_t_1);
    5975           0 :   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error)
    5976           0 :   __Pyx_GOTREF(__pyx_t_2);
    5977           0 :   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 226, __pyx_L1_error)
    5978           0 :   __Pyx_GOTREF(__pyx_t_3);
    5979           0 :   __Pyx_INCREF((PyObject *)__pyx_v_self);
    5980           0 :   __Pyx_GIVEREF((PyObject *)__pyx_v_self);
    5981           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(1, 226, __pyx_L1_error);
    5982           0 :   __Pyx_GIVEREF(__pyx_t_1);
    5983           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 226, __pyx_L1_error);
    5984           0 :   __Pyx_GIVEREF(__pyx_t_2);
    5985           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error);
    5986           0 :   __pyx_t_1 = 0;
    5987           0 :   __pyx_t_2 = 0;
    5988           0 :   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error)
    5989           0 :   __Pyx_GOTREF(__pyx_t_2);
    5990           0 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    5991           0 :   __pyx_r = __pyx_t_2;
    5992           0 :   __pyx_t_2 = 0;
    5993           0 :   goto __pyx_L0;
    5994             : 
    5995             :   /* "View.MemoryView":224
    5996             :  * 
    5997             :  *     @cname('get_memview')
    5998             :  *     cdef get_memview(self):             # <<<<<<<<<<<<<<
    5999             :  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
    6000             :  *         return  memoryview(self, flags, self.dtype_is_object)
    6001             :  */
    6002             : 
    6003             :   /* function exit code */
    6004           0 :   __pyx_L1_error:;
    6005           0 :   __Pyx_XDECREF(__pyx_t_1);
    6006           0 :   __Pyx_XDECREF(__pyx_t_2);
    6007           0 :   __Pyx_XDECREF(__pyx_t_3);
    6008           0 :   __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6009           0 :   __pyx_r = 0;
    6010           0 :   __pyx_L0:;
    6011           0 :   __Pyx_XGIVEREF(__pyx_r);
    6012           0 :   __Pyx_RefNannyFinishContext();
    6013           0 :   return __pyx_r;
    6014             : }
    6015             : 
    6016             : /* "View.MemoryView":228
    6017             :  *         return  memoryview(self, flags, self.dtype_is_object)
    6018             :  * 
    6019             :  *     def __len__(self):             # <<<<<<<<<<<<<<
    6020             :  *         return self._shape[0]
    6021             :  * 
    6022             :  */
    6023             : 
    6024             : /* Python wrapper */
    6025             : static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
    6026           0 : static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
    6027           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6028           0 :   Py_ssize_t __pyx_r;
    6029             :   __Pyx_RefNannyDeclarations
    6030           0 :   __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
    6031           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6032           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));
    6033             : 
    6034             :   /* function exit code */
    6035           0 :   __Pyx_RefNannyFinishContext();
    6036           0 :   return __pyx_r;
    6037             : }
    6038             : 
    6039           0 : static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
    6040           0 :   Py_ssize_t __pyx_r;
    6041             : 
    6042             :   /* "View.MemoryView":229
    6043             :  * 
    6044             :  *     def __len__(self):
    6045             :  *         return self._shape[0]             # <<<<<<<<<<<<<<
    6046             :  * 
    6047             :  *     def __getattr__(self, attr):
    6048             :  */
    6049           0 :   __pyx_r = (__pyx_v_self->_shape[0]);
    6050           0 :   goto __pyx_L0;
    6051             : 
    6052             :   /* "View.MemoryView":228
    6053             :  *         return  memoryview(self, flags, self.dtype_is_object)
    6054             :  * 
    6055             :  *     def __len__(self):             # <<<<<<<<<<<<<<
    6056             :  *         return self._shape[0]
    6057             :  * 
    6058             :  */
    6059             : 
    6060             :   /* function exit code */
    6061           0 :   __pyx_L0:;
    6062           0 :   return __pyx_r;
    6063             : }
    6064             : 
    6065             : /* "View.MemoryView":231
    6066             :  *         return self._shape[0]
    6067             :  * 
    6068             :  *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
    6069             :  *         return getattr(self.memview, attr)
    6070             :  * 
    6071             :  */
    6072             : 
    6073             : /* Python wrapper */
    6074             : static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
    6075           0 : static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
    6076           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6077           0 :   PyObject *__pyx_r = 0;
    6078             :   __Pyx_RefNannyDeclarations
    6079           0 :   __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
    6080           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6081           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));
    6082             : 
    6083             :   /* function exit code */
    6084           0 :   __Pyx_RefNannyFinishContext();
    6085           0 :   return __pyx_r;
    6086             : }
    6087             : 
    6088           0 : static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
    6089           0 :   PyObject *__pyx_r = NULL;
    6090             :   __Pyx_RefNannyDeclarations
    6091           0 :   PyObject *__pyx_t_1 = NULL;
    6092           0 :   PyObject *__pyx_t_2 = NULL;
    6093           0 :   int __pyx_lineno = 0;
    6094           0 :   const char *__pyx_filename = NULL;
    6095           0 :   int __pyx_clineno = 0;
    6096           0 :   __Pyx_RefNannySetupContext("__getattr__", 1);
    6097             : 
    6098             :   /* "View.MemoryView":232
    6099             :  * 
    6100             :  *     def __getattr__(self, attr):
    6101             :  *         return getattr(self.memview, attr)             # <<<<<<<<<<<<<<
    6102             :  * 
    6103             :  *     def __getitem__(self, item):
    6104             :  */
    6105           0 :   __Pyx_XDECREF(__pyx_r);
    6106           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 232, __pyx_L1_error)
    6107           0 :   __Pyx_GOTREF(__pyx_t_1);
    6108           0 :   __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 232, __pyx_L1_error)
    6109           0 :   __Pyx_GOTREF(__pyx_t_2);
    6110           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    6111           0 :   __pyx_r = __pyx_t_2;
    6112           0 :   __pyx_t_2 = 0;
    6113           0 :   goto __pyx_L0;
    6114             : 
    6115             :   /* "View.MemoryView":231
    6116             :  *         return self._shape[0]
    6117             :  * 
    6118             :  *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
    6119             :  *         return getattr(self.memview, attr)
    6120             :  * 
    6121             :  */
    6122             : 
    6123             :   /* function exit code */
    6124           0 :   __pyx_L1_error:;
    6125           0 :   __Pyx_XDECREF(__pyx_t_1);
    6126           0 :   __Pyx_XDECREF(__pyx_t_2);
    6127           0 :   __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6128           0 :   __pyx_r = NULL;
    6129           0 :   __pyx_L0:;
    6130           0 :   __Pyx_XGIVEREF(__pyx_r);
    6131           0 :   __Pyx_RefNannyFinishContext();
    6132           0 :   return __pyx_r;
    6133             : }
    6134             : 
    6135             : /* "View.MemoryView":234
    6136             :  *         return getattr(self.memview, attr)
    6137             :  * 
    6138             :  *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
    6139             :  *         return self.memview[item]
    6140             :  * 
    6141             :  */
    6142             : 
    6143             : /* Python wrapper */
    6144             : static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
    6145           0 : static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
    6146           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6147           0 :   PyObject *__pyx_r = 0;
    6148             :   __Pyx_RefNannyDeclarations
    6149           0 :   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
    6150           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6151           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));
    6152             : 
    6153             :   /* function exit code */
    6154           0 :   __Pyx_RefNannyFinishContext();
    6155           0 :   return __pyx_r;
    6156             : }
    6157             : 
    6158           0 : static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
    6159           0 :   PyObject *__pyx_r = NULL;
    6160             :   __Pyx_RefNannyDeclarations
    6161           0 :   PyObject *__pyx_t_1 = NULL;
    6162           0 :   PyObject *__pyx_t_2 = NULL;
    6163           0 :   int __pyx_lineno = 0;
    6164           0 :   const char *__pyx_filename = NULL;
    6165           0 :   int __pyx_clineno = 0;
    6166           0 :   __Pyx_RefNannySetupContext("__getitem__", 1);
    6167             : 
    6168             :   /* "View.MemoryView":235
    6169             :  * 
    6170             :  *     def __getitem__(self, item):
    6171             :  *         return self.memview[item]             # <<<<<<<<<<<<<<
    6172             :  * 
    6173             :  *     def __setitem__(self, item, value):
    6174             :  */
    6175           0 :   __Pyx_XDECREF(__pyx_r);
    6176           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 235, __pyx_L1_error)
    6177           0 :   __Pyx_GOTREF(__pyx_t_1);
    6178           0 :   __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 235, __pyx_L1_error)
    6179           0 :   __Pyx_GOTREF(__pyx_t_2);
    6180           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    6181           0 :   __pyx_r = __pyx_t_2;
    6182           0 :   __pyx_t_2 = 0;
    6183           0 :   goto __pyx_L0;
    6184             : 
    6185             :   /* "View.MemoryView":234
    6186             :  *         return getattr(self.memview, attr)
    6187             :  * 
    6188             :  *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
    6189             :  *         return self.memview[item]
    6190             :  * 
    6191             :  */
    6192             : 
    6193             :   /* function exit code */
    6194           0 :   __pyx_L1_error:;
    6195           0 :   __Pyx_XDECREF(__pyx_t_1);
    6196           0 :   __Pyx_XDECREF(__pyx_t_2);
    6197           0 :   __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6198           0 :   __pyx_r = NULL;
    6199           0 :   __pyx_L0:;
    6200           0 :   __Pyx_XGIVEREF(__pyx_r);
    6201           0 :   __Pyx_RefNannyFinishContext();
    6202           0 :   return __pyx_r;
    6203             : }
    6204             : 
    6205             : /* "View.MemoryView":237
    6206             :  *         return self.memview[item]
    6207             :  * 
    6208             :  *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
    6209             :  *         self.memview[item] = value
    6210             :  * 
    6211             :  */
    6212             : 
    6213             : /* Python wrapper */
    6214             : static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
    6215           0 : static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
    6216           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6217           0 :   int __pyx_r;
    6218             :   __Pyx_RefNannyDeclarations
    6219           0 :   __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
    6220           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6221           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));
    6222             : 
    6223             :   /* function exit code */
    6224           0 :   __Pyx_RefNannyFinishContext();
    6225           0 :   return __pyx_r;
    6226             : }
    6227             : 
    6228           0 : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
    6229           0 :   int __pyx_r;
    6230             :   __Pyx_RefNannyDeclarations
    6231           0 :   PyObject *__pyx_t_1 = NULL;
    6232           0 :   int __pyx_lineno = 0;
    6233           0 :   const char *__pyx_filename = NULL;
    6234           0 :   int __pyx_clineno = 0;
    6235           0 :   __Pyx_RefNannySetupContext("__setitem__", 1);
    6236             : 
    6237             :   /* "View.MemoryView":238
    6238             :  * 
    6239             :  *     def __setitem__(self, item, value):
    6240             :  *         self.memview[item] = value             # <<<<<<<<<<<<<<
    6241             :  * 
    6242             :  * 
    6243             :  */
    6244           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 238, __pyx_L1_error)
    6245           0 :   __Pyx_GOTREF(__pyx_t_1);
    6246           0 :   if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0))) __PYX_ERR(1, 238, __pyx_L1_error)
    6247           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    6248             : 
    6249             :   /* "View.MemoryView":237
    6250             :  *         return self.memview[item]
    6251             :  * 
    6252             :  *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
    6253             :  *         self.memview[item] = value
    6254             :  * 
    6255             :  */
    6256             : 
    6257             :   /* function exit code */
    6258           0 :   __pyx_r = 0;
    6259           0 :   goto __pyx_L0;
    6260           0 :   __pyx_L1_error:;
    6261           0 :   __Pyx_XDECREF(__pyx_t_1);
    6262           0 :   __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6263           0 :   __pyx_r = -1;
    6264           0 :   __pyx_L0:;
    6265           0 :   __Pyx_RefNannyFinishContext();
    6266           0 :   return __pyx_r;
    6267             : }
    6268             : 
    6269             : /* "(tree fragment)":1
    6270             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
    6271             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6272             :  * def __setstate_cython__(self, __pyx_state):
    6273             :  */
    6274             : 
    6275             : /* Python wrapper */
    6276             : static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, 
    6277             : #if CYTHON_METH_FASTCALL
    6278             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    6279             : #else
    6280             : PyObject *__pyx_args, PyObject *__pyx_kwds
    6281             : #endif
    6282             : ); /*proto*/
    6283           0 : static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, 
    6284             : #if CYTHON_METH_FASTCALL
    6285             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    6286             : #else
    6287             : PyObject *__pyx_args, PyObject *__pyx_kwds
    6288             : #endif
    6289             : ) {
    6290             :   #if !CYTHON_METH_FASTCALL
    6291             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    6292             :   #endif
    6293           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6294           0 :   PyObject *__pyx_r = 0;
    6295             :   __Pyx_RefNannyDeclarations
    6296           0 :   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
    6297             :   #if !CYTHON_METH_FASTCALL
    6298             :   #if CYTHON_ASSUME_SAFE_MACROS
    6299             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    6300             :   #else
    6301             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
    6302             :   #endif
    6303             :   #endif
    6304           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
    6305           0 :   if (unlikely(__pyx_nargs > 0)) {
    6306           0 :     __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
    6307           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
    6308           0 :   __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));
    6309             : 
    6310             :   /* function exit code */
    6311           0 :   __Pyx_RefNannyFinishContext();
    6312           0 :   return __pyx_r;
    6313             : }
    6314             : 
    6315           0 : static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
    6316           0 :   PyObject *__pyx_r = NULL;
    6317             :   __Pyx_RefNannyDeclarations
    6318           0 :   int __pyx_lineno = 0;
    6319           0 :   const char *__pyx_filename = NULL;
    6320           0 :   int __pyx_clineno = 0;
    6321           0 :   __Pyx_RefNannySetupContext("__reduce_cython__", 1);
    6322             : 
    6323             :   /* "(tree fragment)":2
    6324             :  * def __reduce_cython__(self):
    6325             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
    6326             :  * def __setstate_cython__(self, __pyx_state):
    6327             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6328             :  */
    6329           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
    6330           0 :   __PYX_ERR(1, 2, __pyx_L1_error)
    6331             : 
    6332             :   /* "(tree fragment)":1
    6333             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
    6334             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6335             :  * def __setstate_cython__(self, __pyx_state):
    6336             :  */
    6337             : 
    6338             :   /* function exit code */
    6339           0 :   __pyx_L1_error:;
    6340           0 :   __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6341           0 :   __pyx_r = NULL;
    6342           0 :   __Pyx_XGIVEREF(__pyx_r);
    6343           0 :   __Pyx_RefNannyFinishContext();
    6344           0 :   return __pyx_r;
    6345             : }
    6346             : 
    6347             : /* "(tree fragment)":3
    6348             :  * def __reduce_cython__(self):
    6349             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6350             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
    6351             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6352             :  */
    6353             : 
    6354             : /* Python wrapper */
    6355             : static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, 
    6356             : #if CYTHON_METH_FASTCALL
    6357             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    6358             : #else
    6359             : PyObject *__pyx_args, PyObject *__pyx_kwds
    6360             : #endif
    6361             : ); /*proto*/
    6362           0 : static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, 
    6363             : #if CYTHON_METH_FASTCALL
    6364             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    6365             : #else
    6366             : PyObject *__pyx_args, PyObject *__pyx_kwds
    6367             : #endif
    6368             : ) {
    6369           0 :   CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
    6370             :   #if !CYTHON_METH_FASTCALL
    6371             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    6372             :   #endif
    6373           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6374           0 :   PyObject* values[1] = {0};
    6375           0 :   int __pyx_lineno = 0;
    6376           0 :   const char *__pyx_filename = NULL;
    6377           0 :   int __pyx_clineno = 0;
    6378           0 :   PyObject *__pyx_r = 0;
    6379             :   __Pyx_RefNannyDeclarations
    6380           0 :   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
    6381             :   #if !CYTHON_METH_FASTCALL
    6382             :   #if CYTHON_ASSUME_SAFE_MACROS
    6383             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    6384             :   #else
    6385             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
    6386             :   #endif
    6387             :   #endif
    6388           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
    6389             :   {
    6390           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    6391           0 :     if (__pyx_kwds) {
    6392           0 :       Py_ssize_t kw_args;
    6393           0 :       switch (__pyx_nargs) {
    6394           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    6395           0 :         CYTHON_FALLTHROUGH;
    6396           0 :         case  0: break;
    6397           0 :         default: goto __pyx_L5_argtuple_error;
    6398             :       }
    6399           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
    6400           0 :       switch (__pyx_nargs) {
    6401             :         case  0:
    6402           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
    6403           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
    6404           0 :           kw_args--;
    6405             :         }
    6406           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
    6407           0 :         else goto __pyx_L5_argtuple_error;
    6408             :       }
    6409           0 :       if (unlikely(kw_args > 0)) {
    6410           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
    6411           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
    6412             :       }
    6413           0 :     } else if (unlikely(__pyx_nargs != 1)) {
    6414           0 :       goto __pyx_L5_argtuple_error;
    6415             :     } else {
    6416           0 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    6417             :     }
    6418           0 :     __pyx_v___pyx_state = values[0];
    6419             :   }
    6420           0 :   goto __pyx_L6_skip;
    6421           0 :   __pyx_L5_argtuple_error:;
    6422           0 :   __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
    6423           0 :   __pyx_L6_skip:;
    6424           0 :   goto __pyx_L4_argument_unpacking_done;
    6425           0 :   __pyx_L3_error:;
    6426             :   {
    6427           0 :     Py_ssize_t __pyx_temp;
    6428           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    6429             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    6430             :     }
    6431             :   }
    6432           0 :   __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6433           0 :   __Pyx_RefNannyFinishContext();
    6434           0 :   return NULL;
    6435           0 :   __pyx_L4_argument_unpacking_done:;
    6436           0 :   __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v___pyx_state);
    6437             : 
    6438             :   /* function exit code */
    6439             :   {
    6440           0 :     Py_ssize_t __pyx_temp;
    6441           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    6442             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    6443             :     }
    6444             :   }
    6445             :   __Pyx_RefNannyFinishContext();
    6446             :   return __pyx_r;
    6447             : }
    6448             : 
    6449           0 : static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
    6450           0 :   PyObject *__pyx_r = NULL;
    6451             :   __Pyx_RefNannyDeclarations
    6452           0 :   int __pyx_lineno = 0;
    6453           0 :   const char *__pyx_filename = NULL;
    6454           0 :   int __pyx_clineno = 0;
    6455           0 :   __Pyx_RefNannySetupContext("__setstate_cython__", 1);
    6456             : 
    6457             :   /* "(tree fragment)":4
    6458             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6459             :  * def __setstate_cython__(self, __pyx_state):
    6460             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
    6461             :  */
    6462           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
    6463           0 :   __PYX_ERR(1, 4, __pyx_L1_error)
    6464             : 
    6465             :   /* "(tree fragment)":3
    6466             :  * def __reduce_cython__(self):
    6467             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6468             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
    6469             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6470             :  */
    6471             : 
    6472             :   /* function exit code */
    6473           0 :   __pyx_L1_error:;
    6474           0 :   __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6475           0 :   __pyx_r = NULL;
    6476           0 :   __Pyx_XGIVEREF(__pyx_r);
    6477           0 :   __Pyx_RefNannyFinishContext();
    6478           0 :   return __pyx_r;
    6479             : }
    6480             : 
    6481             : /* "View.MemoryView":248
    6482             :  * 
    6483             :  * @cname("__pyx_array_allocate_buffer")
    6484             :  * cdef int _allocate_buffer(array self) except -1:             # <<<<<<<<<<<<<<
    6485             :  * 
    6486             :  * 
    6487             :  */
    6488             : 
    6489           0 : static int __pyx_array_allocate_buffer(struct __pyx_array_obj *__pyx_v_self) {
    6490           0 :   Py_ssize_t __pyx_v_i;
    6491           0 :   PyObject **__pyx_v_p;
    6492           0 :   int __pyx_r;
    6493           0 :   int __pyx_t_1;
    6494           0 :   Py_ssize_t __pyx_t_2;
    6495           0 :   Py_ssize_t __pyx_t_3;
    6496           0 :   Py_ssize_t __pyx_t_4;
    6497           0 :   int __pyx_lineno = 0;
    6498           0 :   const char *__pyx_filename = NULL;
    6499           0 :   int __pyx_clineno = 0;
    6500             : 
    6501             :   /* "View.MemoryView":254
    6502             :  *     cdef PyObject **p
    6503             :  * 
    6504             :  *     self.free_data = True             # <<<<<<<<<<<<<<
    6505             :  *     self.data = <char *>malloc(self.len)
    6506             :  *     if not self.data:
    6507             :  */
    6508           0 :   __pyx_v_self->free_data = 1;
    6509             : 
    6510             :   /* "View.MemoryView":255
    6511             :  * 
    6512             :  *     self.free_data = True
    6513             :  *     self.data = <char *>malloc(self.len)             # <<<<<<<<<<<<<<
    6514             :  *     if not self.data:
    6515             :  *         raise MemoryError, "unable to allocate array data."
    6516             :  */
    6517           0 :   __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));
    6518             : 
    6519             :   /* "View.MemoryView":256
    6520             :  *     self.free_data = True
    6521             :  *     self.data = <char *>malloc(self.len)
    6522             :  *     if not self.data:             # <<<<<<<<<<<<<<
    6523             :  *         raise MemoryError, "unable to allocate array data."
    6524             :  * 
    6525             :  */
    6526           0 :   __pyx_t_1 = (!(__pyx_v_self->data != 0));
    6527           0 :   if (unlikely(__pyx_t_1)) {
    6528             : 
    6529             :     /* "View.MemoryView":257
    6530             :  *     self.data = <char *>malloc(self.len)
    6531             :  *     if not self.data:
    6532             :  *         raise MemoryError, "unable to allocate array data."             # <<<<<<<<<<<<<<
    6533             :  * 
    6534             :  *     if self.dtype_is_object:
    6535             :  */
    6536           0 :     __Pyx_Raise(__pyx_builtin_MemoryError, __pyx_kp_s_unable_to_allocate_array_data, 0, 0);
    6537           0 :     __PYX_ERR(1, 257, __pyx_L1_error)
    6538             : 
    6539             :     /* "View.MemoryView":256
    6540             :  *     self.free_data = True
    6541             :  *     self.data = <char *>malloc(self.len)
    6542             :  *     if not self.data:             # <<<<<<<<<<<<<<
    6543             :  *         raise MemoryError, "unable to allocate array data."
    6544             :  * 
    6545             :  */
    6546             :   }
    6547             : 
    6548             :   /* "View.MemoryView":259
    6549             :  *         raise MemoryError, "unable to allocate array data."
    6550             :  * 
    6551             :  *     if self.dtype_is_object:             # <<<<<<<<<<<<<<
    6552             :  *         p = <PyObject **> self.data
    6553             :  *         for i in range(self.len // self.itemsize):
    6554             :  */
    6555           0 :   if (__pyx_v_self->dtype_is_object) {
    6556             : 
    6557             :     /* "View.MemoryView":260
    6558             :  * 
    6559             :  *     if self.dtype_is_object:
    6560             :  *         p = <PyObject **> self.data             # <<<<<<<<<<<<<<
    6561             :  *         for i in range(self.len // self.itemsize):
    6562             :  *             p[i] = Py_None
    6563             :  */
    6564           0 :     __pyx_v_p = ((PyObject **)__pyx_v_self->data);
    6565             : 
    6566             :     /* "View.MemoryView":261
    6567             :  *     if self.dtype_is_object:
    6568             :  *         p = <PyObject **> self.data
    6569             :  *         for i in range(self.len // self.itemsize):             # <<<<<<<<<<<<<<
    6570             :  *             p[i] = Py_None
    6571             :  *             Py_INCREF(Py_None)
    6572             :  */
    6573           0 :     if (unlikely(__pyx_v_self->itemsize == 0)) {
    6574           0 :       PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    6575           0 :       __PYX_ERR(1, 261, __pyx_L1_error)
    6576             :     }
    6577           0 :     else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_self->itemsize == (Py_ssize_t)-1)  && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
    6578           0 :       PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
    6579           0 :       __PYX_ERR(1, 261, __pyx_L1_error)
    6580             :     }
    6581           0 :     __pyx_t_2 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_self->itemsize);
    6582           0 :     __pyx_t_3 = __pyx_t_2;
    6583           0 :     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    6584           0 :       __pyx_v_i = __pyx_t_4;
    6585             : 
    6586             :       /* "View.MemoryView":262
    6587             :  *         p = <PyObject **> self.data
    6588             :  *         for i in range(self.len // self.itemsize):
    6589             :  *             p[i] = Py_None             # <<<<<<<<<<<<<<
    6590             :  *             Py_INCREF(Py_None)
    6591             :  *     return 0
    6592             :  */
    6593           0 :       (__pyx_v_p[__pyx_v_i]) = Py_None;
    6594             : 
    6595             :       /* "View.MemoryView":263
    6596             :  *         for i in range(self.len // self.itemsize):
    6597             :  *             p[i] = Py_None
    6598             :  *             Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
    6599             :  *     return 0
    6600             :  * 
    6601             :  */
    6602           0 :       Py_INCREF(Py_None);
    6603             :     }
    6604             : 
    6605             :     /* "View.MemoryView":259
    6606             :  *         raise MemoryError, "unable to allocate array data."
    6607             :  * 
    6608             :  *     if self.dtype_is_object:             # <<<<<<<<<<<<<<
    6609             :  *         p = <PyObject **> self.data
    6610             :  *         for i in range(self.len // self.itemsize):
    6611             :  */
    6612             :   }
    6613             : 
    6614             :   /* "View.MemoryView":264
    6615             :  *             p[i] = Py_None
    6616             :  *             Py_INCREF(Py_None)
    6617             :  *     return 0             # <<<<<<<<<<<<<<
    6618             :  * 
    6619             :  * 
    6620             :  */
    6621           0 :   __pyx_r = 0;
    6622           0 :   goto __pyx_L0;
    6623             : 
    6624             :   /* "View.MemoryView":248
    6625             :  * 
    6626             :  * @cname("__pyx_array_allocate_buffer")
    6627             :  * cdef int _allocate_buffer(array self) except -1:             # <<<<<<<<<<<<<<
    6628             :  * 
    6629             :  * 
    6630             :  */
    6631             : 
    6632             :   /* function exit code */
    6633           0 :   __pyx_L1_error:;
    6634           0 :   __Pyx_AddTraceback("View.MemoryView._allocate_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6635           0 :   __pyx_r = -1;
    6636           0 :   __pyx_L0:;
    6637           0 :   return __pyx_r;
    6638             : }
    6639             : 
    6640             : /* "View.MemoryView":268
    6641             :  * 
    6642             :  * @cname("__pyx_array_new")
    6643             :  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf):             # <<<<<<<<<<<<<<
    6644             :  *     cdef array result
    6645             :  *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
    6646             :  */
    6647             : 
    6648           0 : static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_c_mode, char *__pyx_v_buf) {
    6649           0 :   struct __pyx_array_obj *__pyx_v_result = 0;
    6650           0 :   PyObject *__pyx_v_mode = 0;
    6651           0 :   struct __pyx_array_obj *__pyx_r = NULL;
    6652             :   __Pyx_RefNannyDeclarations
    6653           0 :   PyObject *__pyx_t_1 = NULL;
    6654           0 :   int __pyx_t_2;
    6655           0 :   PyObject *__pyx_t_3 = NULL;
    6656           0 :   PyObject *__pyx_t_4 = NULL;
    6657           0 :   int __pyx_lineno = 0;
    6658           0 :   const char *__pyx_filename = NULL;
    6659           0 :   int __pyx_clineno = 0;
    6660           0 :   __Pyx_RefNannySetupContext("array_cwrapper", 1);
    6661             : 
    6662             :   /* "View.MemoryView":270
    6663             :  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf):
    6664             :  *     cdef array result
    6665             :  *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.             # <<<<<<<<<<<<<<
    6666             :  * 
    6667             :  *     if buf is NULL:
    6668             :  */
    6669           0 :   __pyx_t_2 = ((__pyx_v_c_mode[0]) == 'f');
    6670           0 :   if (__pyx_t_2) {
    6671           0 :     __Pyx_INCREF(__pyx_n_s_fortran);
    6672             :     __pyx_t_1 = __pyx_n_s_fortran;
    6673             :   } else {
    6674           0 :     __Pyx_INCREF(__pyx_n_s_c);
    6675             :     __pyx_t_1 = __pyx_n_s_c;
    6676             :   }
    6677           0 :   __pyx_v_mode = ((PyObject*)__pyx_t_1);
    6678           0 :   __pyx_t_1 = 0;
    6679             : 
    6680             :   /* "View.MemoryView":272
    6681             :  *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
    6682             :  * 
    6683             :  *     if buf is NULL:             # <<<<<<<<<<<<<<
    6684             :  *         result = array.__new__(array, shape, itemsize, format, mode)
    6685             :  *     else:
    6686             :  */
    6687           0 :   __pyx_t_2 = (__pyx_v_buf == NULL);
    6688           0 :   if (__pyx_t_2) {
    6689             : 
    6690             :     /* "View.MemoryView":273
    6691             :  * 
    6692             :  *     if buf is NULL:
    6693             :  *         result = array.__new__(array, shape, itemsize, format, mode)             # <<<<<<<<<<<<<<
    6694             :  *     else:
    6695             :  *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)
    6696             :  */
    6697           0 :     __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 273, __pyx_L1_error)
    6698           0 :     __Pyx_GOTREF(__pyx_t_1);
    6699           0 :     __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error)
    6700           0 :     __Pyx_GOTREF(__pyx_t_3);
    6701           0 :     __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 273, __pyx_L1_error)
    6702           0 :     __Pyx_GOTREF(__pyx_t_4);
    6703           0 :     __Pyx_INCREF(__pyx_v_shape);
    6704           0 :     __Pyx_GIVEREF(__pyx_v_shape);
    6705           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shape)) __PYX_ERR(1, 273, __pyx_L1_error);
    6706           0 :     __Pyx_GIVEREF(__pyx_t_1);
    6707           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 273, __pyx_L1_error);
    6708           0 :     __Pyx_GIVEREF(__pyx_t_3);
    6709           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error);
    6710           0 :     __Pyx_INCREF(__pyx_v_mode);
    6711           0 :     __Pyx_GIVEREF(__pyx_v_mode);
    6712           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_mode)) __PYX_ERR(1, 273, __pyx_L1_error);
    6713           0 :     __pyx_t_1 = 0;
    6714           0 :     __pyx_t_3 = 0;
    6715           0 :     __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_array_type), __pyx_t_4, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error)
    6716           0 :     __Pyx_GOTREF((PyObject *)__pyx_t_3);
    6717           0 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    6718           0 :     __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3);
    6719           0 :     __pyx_t_3 = 0;
    6720             : 
    6721             :     /* "View.MemoryView":272
    6722             :  *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
    6723             :  * 
    6724             :  *     if buf is NULL:             # <<<<<<<<<<<<<<
    6725             :  *         result = array.__new__(array, shape, itemsize, format, mode)
    6726             :  *     else:
    6727             :  */
    6728           0 :     goto __pyx_L3;
    6729             :   }
    6730             : 
    6731             :   /* "View.MemoryView":275
    6732             :  *         result = array.__new__(array, shape, itemsize, format, mode)
    6733             :  *     else:
    6734             :  *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)             # <<<<<<<<<<<<<<
    6735             :  *         result.data = buf
    6736             :  * 
    6737             :  */
    6738             :   /*else*/ {
    6739           0 :     __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error)
    6740           0 :     __Pyx_GOTREF(__pyx_t_3);
    6741           0 :     __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error)
    6742           0 :     __Pyx_GOTREF(__pyx_t_4);
    6743           0 :     __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 275, __pyx_L1_error)
    6744           0 :     __Pyx_GOTREF(__pyx_t_1);
    6745           0 :     __Pyx_INCREF(__pyx_v_shape);
    6746           0 :     __Pyx_GIVEREF(__pyx_v_shape);
    6747           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_shape)) __PYX_ERR(1, 275, __pyx_L1_error);
    6748           0 :     __Pyx_GIVEREF(__pyx_t_3);
    6749           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error);
    6750           0 :     __Pyx_GIVEREF(__pyx_t_4);
    6751           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error);
    6752           0 :     __Pyx_INCREF(__pyx_v_mode);
    6753           0 :     __Pyx_GIVEREF(__pyx_v_mode);
    6754           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_mode)) __PYX_ERR(1, 275, __pyx_L1_error);
    6755           0 :     __pyx_t_3 = 0;
    6756           0 :     __pyx_t_4 = 0;
    6757           0 :     __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error)
    6758           0 :     __Pyx_GOTREF(__pyx_t_4);
    6759           0 :     if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(1, 275, __pyx_L1_error)
    6760           0 :     __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_array_type), __pyx_t_1, __pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error)
    6761           0 :     __Pyx_GOTREF((PyObject *)__pyx_t_3);
    6762           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    6763           0 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    6764           0 :     __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3);
    6765           0 :     __pyx_t_3 = 0;
    6766             : 
    6767             :     /* "View.MemoryView":276
    6768             :  *     else:
    6769             :  *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)
    6770             :  *         result.data = buf             # <<<<<<<<<<<<<<
    6771             :  * 
    6772             :  *     return result
    6773             :  */
    6774           0 :     __pyx_v_result->data = __pyx_v_buf;
    6775             :   }
    6776           0 :   __pyx_L3:;
    6777             : 
    6778             :   /* "View.MemoryView":278
    6779             :  *         result.data = buf
    6780             :  * 
    6781             :  *     return result             # <<<<<<<<<<<<<<
    6782             :  * 
    6783             :  * 
    6784             :  */
    6785           0 :   __Pyx_XDECREF((PyObject *)__pyx_r);
    6786           0 :   __Pyx_INCREF((PyObject *)__pyx_v_result);
    6787           0 :   __pyx_r = __pyx_v_result;
    6788           0 :   goto __pyx_L0;
    6789             : 
    6790             :   /* "View.MemoryView":268
    6791             :  * 
    6792             :  * @cname("__pyx_array_new")
    6793             :  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf):             # <<<<<<<<<<<<<<
    6794             :  *     cdef array result
    6795             :  *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
    6796             :  */
    6797             : 
    6798             :   /* function exit code */
    6799           0 :   __pyx_L1_error:;
    6800           0 :   __Pyx_XDECREF(__pyx_t_1);
    6801           0 :   __Pyx_XDECREF(__pyx_t_3);
    6802           0 :   __Pyx_XDECREF(__pyx_t_4);
    6803           0 :   __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6804           0 :   __pyx_r = 0;
    6805           0 :   __pyx_L0:;
    6806           0 :   __Pyx_XDECREF((PyObject *)__pyx_v_result);
    6807           0 :   __Pyx_XDECREF(__pyx_v_mode);
    6808           0 :   __Pyx_XGIVEREF((PyObject *)__pyx_r);
    6809           0 :   __Pyx_RefNannyFinishContext();
    6810           0 :   return __pyx_r;
    6811             : }
    6812             : 
    6813             : /* "View.MemoryView":304
    6814             :  * cdef class Enum(object):
    6815             :  *     cdef object name
    6816             :  *     def __init__(self, name):             # <<<<<<<<<<<<<<
    6817             :  *         self.name = name
    6818             :  *     def __repr__(self):
    6819             :  */
    6820             : 
    6821             : /* Python wrapper */
    6822             : static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    6823          15 : static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    6824          15 :   PyObject *__pyx_v_name = 0;
    6825          15 :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    6826          15 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6827          15 :   PyObject* values[1] = {0};
    6828          15 :   int __pyx_lineno = 0;
    6829          15 :   const char *__pyx_filename = NULL;
    6830          15 :   int __pyx_clineno = 0;
    6831          15 :   int __pyx_r;
    6832             :   __Pyx_RefNannyDeclarations
    6833          15 :   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
    6834             :   #if CYTHON_ASSUME_SAFE_MACROS
    6835          15 :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    6836             :   #else
    6837             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
    6838             :   #endif
    6839          15 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6840             :   {
    6841          15 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
    6842          15 :     if (__pyx_kwds) {
    6843           0 :       Py_ssize_t kw_args;
    6844           0 :       switch (__pyx_nargs) {
    6845           0 :         case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    6846           0 :         CYTHON_FALLTHROUGH;
    6847           0 :         case  0: break;
    6848           0 :         default: goto __pyx_L5_argtuple_error;
    6849             :       }
    6850           0 :       kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
    6851           0 :       switch (__pyx_nargs) {
    6852           0 :         case  0:
    6853           0 :         if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) {
    6854           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
    6855           0 :           kw_args--;
    6856             :         }
    6857           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 304, __pyx_L3_error)
    6858           0 :         else goto __pyx_L5_argtuple_error;
    6859             :       }
    6860           0 :       if (unlikely(kw_args > 0)) {
    6861           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
    6862           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(1, 304, __pyx_L3_error)
    6863             :       }
    6864          15 :     } else if (unlikely(__pyx_nargs != 1)) {
    6865           0 :       goto __pyx_L5_argtuple_error;
    6866             :     } else {
    6867          15 :       values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    6868             :     }
    6869          15 :     __pyx_v_name = values[0];
    6870             :   }
    6871          15 :   goto __pyx_L6_skip;
    6872           0 :   __pyx_L5_argtuple_error:;
    6873           0 :   __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 304, __pyx_L3_error)
    6874          15 :   __pyx_L6_skip:;
    6875          15 :   goto __pyx_L4_argument_unpacking_done;
    6876           0 :   __pyx_L3_error:;
    6877             :   {
    6878           0 :     Py_ssize_t __pyx_temp;
    6879           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    6880             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    6881             :     }
    6882             :   }
    6883           0 :   __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6884           0 :   __Pyx_RefNannyFinishContext();
    6885           0 :   return -1;
    6886          15 :   __pyx_L4_argument_unpacking_done:;
    6887          15 :   __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);
    6888             : 
    6889             :   /* function exit code */
    6890             :   {
    6891          15 :     Py_ssize_t __pyx_temp;
    6892          15 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    6893             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    6894             :     }
    6895             :   }
    6896             :   __Pyx_RefNannyFinishContext();
    6897             :   return __pyx_r;
    6898             : }
    6899             : 
    6900          15 : static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
    6901          15 :   int __pyx_r;
    6902             :   __Pyx_RefNannyDeclarations
    6903          15 :   __Pyx_RefNannySetupContext("__init__", 1);
    6904             : 
    6905             :   /* "View.MemoryView":305
    6906             :  *     cdef object name
    6907             :  *     def __init__(self, name):
    6908             :  *         self.name = name             # <<<<<<<<<<<<<<
    6909             :  *     def __repr__(self):
    6910             :  *         return self.name
    6911             :  */
    6912          15 :   __Pyx_INCREF(__pyx_v_name);
    6913          15 :   __Pyx_GIVEREF(__pyx_v_name);
    6914          15 :   __Pyx_GOTREF(__pyx_v_self->name);
    6915          15 :   __Pyx_DECREF(__pyx_v_self->name);
    6916          15 :   __pyx_v_self->name = __pyx_v_name;
    6917             : 
    6918             :   /* "View.MemoryView":304
    6919             :  * cdef class Enum(object):
    6920             :  *     cdef object name
    6921             :  *     def __init__(self, name):             # <<<<<<<<<<<<<<
    6922             :  *         self.name = name
    6923             :  *     def __repr__(self):
    6924             :  */
    6925             : 
    6926             :   /* function exit code */
    6927          15 :   __pyx_r = 0;
    6928          15 :   __Pyx_RefNannyFinishContext();
    6929          15 :   return __pyx_r;
    6930             : }
    6931             : 
    6932             : /* "View.MemoryView":306
    6933             :  *     def __init__(self, name):
    6934             :  *         self.name = name
    6935             :  *     def __repr__(self):             # <<<<<<<<<<<<<<
    6936             :  *         return self.name
    6937             :  * 
    6938             :  */
    6939             : 
    6940             : /* Python wrapper */
    6941             : static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
    6942           0 : static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
    6943           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6944           0 :   PyObject *__pyx_r = 0;
    6945             :   __Pyx_RefNannyDeclarations
    6946           0 :   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
    6947           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6948           0 :   __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
    6949             : 
    6950             :   /* function exit code */
    6951           0 :   __Pyx_RefNannyFinishContext();
    6952           0 :   return __pyx_r;
    6953             : }
    6954             : 
    6955           0 : static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
    6956           0 :   PyObject *__pyx_r = NULL;
    6957             :   __Pyx_RefNannyDeclarations
    6958           0 :   __Pyx_RefNannySetupContext("__repr__", 1);
    6959             : 
    6960             :   /* "View.MemoryView":307
    6961             :  *         self.name = name
    6962             :  *     def __repr__(self):
    6963             :  *         return self.name             # <<<<<<<<<<<<<<
    6964             :  * 
    6965             :  * cdef generic = Enum("<strided and direct or indirect>")
    6966             :  */
    6967           0 :   __Pyx_XDECREF(__pyx_r);
    6968           0 :   __Pyx_INCREF(__pyx_v_self->name);
    6969           0 :   __pyx_r = __pyx_v_self->name;
    6970           0 :   goto __pyx_L0;
    6971             : 
    6972             :   /* "View.MemoryView":306
    6973             :  *     def __init__(self, name):
    6974             :  *         self.name = name
    6975             :  *     def __repr__(self):             # <<<<<<<<<<<<<<
    6976             :  *         return self.name
    6977             :  * 
    6978             :  */
    6979             : 
    6980             :   /* function exit code */
    6981           0 :   __pyx_L0:;
    6982           0 :   __Pyx_XGIVEREF(__pyx_r);
    6983           0 :   __Pyx_RefNannyFinishContext();
    6984           0 :   return __pyx_r;
    6985             : }
    6986             : 
    6987             : /* "(tree fragment)":1
    6988             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
    6989             :  *     cdef tuple state
    6990             :  *     cdef object _dict
    6991             :  */
    6992             : 
    6993             : /* Python wrapper */
    6994             : static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, 
    6995             : #if CYTHON_METH_FASTCALL
    6996             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    6997             : #else
    6998             : PyObject *__pyx_args, PyObject *__pyx_kwds
    6999             : #endif
    7000             : ); /*proto*/
    7001           0 : static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, 
    7002             : #if CYTHON_METH_FASTCALL
    7003             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    7004             : #else
    7005             : PyObject *__pyx_args, PyObject *__pyx_kwds
    7006             : #endif
    7007             : ) {
    7008             :   #if !CYTHON_METH_FASTCALL
    7009             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    7010             :   #endif
    7011           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    7012           0 :   PyObject *__pyx_r = 0;
    7013             :   __Pyx_RefNannyDeclarations
    7014           0 :   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
    7015             :   #if !CYTHON_METH_FASTCALL
    7016             :   #if CYTHON_ASSUME_SAFE_MACROS
    7017             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    7018             :   #else
    7019             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
    7020             :   #endif
    7021             :   #endif
    7022           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
    7023           0 :   if (unlikely(__pyx_nargs > 0)) {
    7024           0 :     __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
    7025           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
    7026           0 :   __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
    7027             : 
    7028             :   /* function exit code */
    7029           0 :   __Pyx_RefNannyFinishContext();
    7030           0 :   return __pyx_r;
    7031             : }
    7032             : 
    7033           0 : static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
    7034           0 :   PyObject *__pyx_v_state = 0;
    7035           0 :   PyObject *__pyx_v__dict = 0;
    7036           0 :   int __pyx_v_use_setstate;
    7037           0 :   PyObject *__pyx_r = NULL;
    7038             :   __Pyx_RefNannyDeclarations
    7039           0 :   PyObject *__pyx_t_1 = NULL;
    7040           0 :   int __pyx_t_2;
    7041           0 :   PyObject *__pyx_t_3 = NULL;
    7042           0 :   PyObject *__pyx_t_4 = NULL;
    7043           0 :   int __pyx_lineno = 0;
    7044           0 :   const char *__pyx_filename = NULL;
    7045           0 :   int __pyx_clineno = 0;
    7046           0 :   __Pyx_RefNannySetupContext("__reduce_cython__", 1);
    7047             : 
    7048             :   /* "(tree fragment)":5
    7049             :  *     cdef object _dict
    7050             :  *     cdef bint use_setstate
    7051             :  *     state = (self.name,)             # <<<<<<<<<<<<<<
    7052             :  *     _dict = getattr(self, '__dict__', None)
    7053             :  *     if _dict is not None:
    7054             :  */
    7055           0 :   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    7056           0 :   __Pyx_GOTREF(__pyx_t_1);
    7057           0 :   __Pyx_INCREF(__pyx_v_self->name);
    7058           0 :   __Pyx_GIVEREF(__pyx_v_self->name);
    7059           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name)) __PYX_ERR(1, 5, __pyx_L1_error);
    7060           0 :   __pyx_v_state = ((PyObject*)__pyx_t_1);
    7061           0 :   __pyx_t_1 = 0;
    7062             : 
    7063             :   /* "(tree fragment)":6
    7064             :  *     cdef bint use_setstate
    7065             :  *     state = (self.name,)
    7066             :  *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
    7067             :  *     if _dict is not None:
    7068             :  *         state += (_dict,)
    7069             :  */
    7070           0 :   __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    7071           0 :   __Pyx_GOTREF(__pyx_t_1);
    7072           0 :   __pyx_v__dict = __pyx_t_1;
    7073           0 :   __pyx_t_1 = 0;
    7074             : 
    7075             :   /* "(tree fragment)":7
    7076             :  *     state = (self.name,)
    7077             :  *     _dict = getattr(self, '__dict__', None)
    7078             :  *     if _dict is not None:             # <<<<<<<<<<<<<<
    7079             :  *         state += (_dict,)
    7080             :  *         use_setstate = True
    7081             :  */
    7082           0 :   __pyx_t_2 = (__pyx_v__dict != Py_None);
    7083           0 :   if (__pyx_t_2) {
    7084             : 
    7085             :     /* "(tree fragment)":8
    7086             :  *     _dict = getattr(self, '__dict__', None)
    7087             :  *     if _dict is not None:
    7088             :  *         state += (_dict,)             # <<<<<<<<<<<<<<
    7089             :  *         use_setstate = True
    7090             :  *     else:
    7091             :  */
    7092           0 :     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    7093           0 :     __Pyx_GOTREF(__pyx_t_1);
    7094           0 :     __Pyx_INCREF(__pyx_v__dict);
    7095           0 :     __Pyx_GIVEREF(__pyx_v__dict);
    7096           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
    7097           0 :     __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
    7098           0 :     __Pyx_GOTREF(__pyx_t_3);
    7099           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    7100           0 :     __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
    7101           0 :     __pyx_t_3 = 0;
    7102             : 
    7103             :     /* "(tree fragment)":9
    7104             :  *     if _dict is not None:
    7105             :  *         state += (_dict,)
    7106             :  *         use_setstate = True             # <<<<<<<<<<<<<<
    7107             :  *     else:
    7108             :  *         use_setstate = self.name is not None
    7109             :  */
    7110           0 :     __pyx_v_use_setstate = 1;
    7111             : 
    7112             :     /* "(tree fragment)":7
    7113             :  *     state = (self.name,)
    7114             :  *     _dict = getattr(self, '__dict__', None)
    7115             :  *     if _dict is not None:             # <<<<<<<<<<<<<<
    7116             :  *         state += (_dict,)
    7117             :  *         use_setstate = True
    7118             :  */
    7119           0 :     goto __pyx_L3;
    7120             :   }
    7121             : 
    7122             :   /* "(tree fragment)":11
    7123             :  *         use_setstate = True
    7124             :  *     else:
    7125             :  *         use_setstate = self.name is not None             # <<<<<<<<<<<<<<
    7126             :  *     if use_setstate:
    7127             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
    7128             :  */
    7129             :   /*else*/ {
    7130           0 :     __pyx_t_2 = (__pyx_v_self->name != Py_None);
    7131           0 :     __pyx_v_use_setstate = __pyx_t_2;
    7132             :   }
    7133           0 :   __pyx_L3:;
    7134             : 
    7135             :   /* "(tree fragment)":12
    7136             :  *     else:
    7137             :  *         use_setstate = self.name is not None
    7138             :  *     if use_setstate:             # <<<<<<<<<<<<<<
    7139             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
    7140             :  *     else:
    7141             :  */
    7142           0 :   if (__pyx_v_use_setstate) {
    7143             : 
    7144             :     /* "(tree fragment)":13
    7145             :  *         use_setstate = self.name is not None
    7146             :  *     if use_setstate:
    7147             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state             # <<<<<<<<<<<<<<
    7148             :  *     else:
    7149             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
    7150             :  */
    7151           0 :     __Pyx_XDECREF(__pyx_r);
    7152           0 :     __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    7153           0 :     __Pyx_GOTREF(__pyx_t_3);
    7154           0 :     __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    7155           0 :     __Pyx_GOTREF(__pyx_t_1);
    7156           0 :     __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    7157           0 :     __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    7158           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error);
    7159           0 :     __Pyx_INCREF(__pyx_int_136983863);
    7160           0 :     __Pyx_GIVEREF(__pyx_int_136983863);
    7161           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_136983863)) __PYX_ERR(1, 13, __pyx_L1_error);
    7162           0 :     __Pyx_INCREF(Py_None);
    7163           0 :     __Pyx_GIVEREF(Py_None);
    7164           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
    7165           0 :     __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    7166           0 :     __Pyx_GOTREF(__pyx_t_4);
    7167           0 :     __Pyx_GIVEREF(__pyx_t_3);
    7168           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
    7169           0 :     __Pyx_GIVEREF(__pyx_t_1);
    7170           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
    7171           0 :     __Pyx_INCREF(__pyx_v_state);
    7172           0 :     __Pyx_GIVEREF(__pyx_v_state);
    7173           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
    7174           0 :     __pyx_t_3 = 0;
    7175           0 :     __pyx_t_1 = 0;
    7176           0 :     __pyx_r = __pyx_t_4;
    7177           0 :     __pyx_t_4 = 0;
    7178           0 :     goto __pyx_L0;
    7179             : 
    7180             :     /* "(tree fragment)":12
    7181             :  *     else:
    7182             :  *         use_setstate = self.name is not None
    7183             :  *     if use_setstate:             # <<<<<<<<<<<<<<
    7184             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
    7185             :  *     else:
    7186             :  */
    7187             :   }
    7188             : 
    7189             :   /* "(tree fragment)":15
    7190             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
    7191             :  *     else:
    7192             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)             # <<<<<<<<<<<<<<
    7193             :  * def __setstate_cython__(self, __pyx_state):
    7194             :  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
    7195             :  */
    7196             :   /*else*/ {
    7197           0 :     __Pyx_XDECREF(__pyx_r);
    7198           0 :     __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    7199           0 :     __Pyx_GOTREF(__pyx_t_4);
    7200           0 :     __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    7201           0 :     __Pyx_GOTREF(__pyx_t_1);
    7202           0 :     __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    7203           0 :     __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    7204           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error);
    7205           0 :     __Pyx_INCREF(__pyx_int_136983863);
    7206           0 :     __Pyx_GIVEREF(__pyx_int_136983863);
    7207           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_136983863)) __PYX_ERR(1, 15, __pyx_L1_error);
    7208           0 :     __Pyx_INCREF(__pyx_v_state);
    7209           0 :     __Pyx_GIVEREF(__pyx_v_state);
    7210           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
    7211           0 :     __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    7212           0 :     __Pyx_GOTREF(__pyx_t_3);
    7213           0 :     __Pyx_GIVEREF(__pyx_t_4);
    7214           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error);
    7215           0 :     __Pyx_GIVEREF(__pyx_t_1);
    7216           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
    7217           0 :     __pyx_t_4 = 0;
    7218           0 :     __pyx_t_1 = 0;
    7219           0 :     __pyx_r = __pyx_t_3;
    7220           0 :     __pyx_t_3 = 0;
    7221           0 :     goto __pyx_L0;
    7222             :   }
    7223             : 
    7224             :   /* "(tree fragment)":1
    7225             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
    7226             :  *     cdef tuple state
    7227             :  *     cdef object _dict
    7228             :  */
    7229             : 
    7230             :   /* function exit code */
    7231           0 :   __pyx_L1_error:;
    7232           0 :   __Pyx_XDECREF(__pyx_t_1);
    7233           0 :   __Pyx_XDECREF(__pyx_t_3);
    7234           0 :   __Pyx_XDECREF(__pyx_t_4);
    7235           0 :   __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7236           0 :   __pyx_r = NULL;
    7237           0 :   __pyx_L0:;
    7238           0 :   __Pyx_XDECREF(__pyx_v_state);
    7239           0 :   __Pyx_XDECREF(__pyx_v__dict);
    7240           0 :   __Pyx_XGIVEREF(__pyx_r);
    7241           0 :   __Pyx_RefNannyFinishContext();
    7242           0 :   return __pyx_r;
    7243             : }
    7244             : 
    7245             : /* "(tree fragment)":16
    7246             :  *     else:
    7247             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
    7248             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
    7249             :  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
    7250             :  */
    7251             : 
    7252             : /* Python wrapper */
    7253             : static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, 
    7254             : #if CYTHON_METH_FASTCALL
    7255             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    7256             : #else
    7257             : PyObject *__pyx_args, PyObject *__pyx_kwds
    7258             : #endif
    7259             : ); /*proto*/
    7260           0 : static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, 
    7261             : #if CYTHON_METH_FASTCALL
    7262             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    7263             : #else
    7264             : PyObject *__pyx_args, PyObject *__pyx_kwds
    7265             : #endif
    7266             : ) {
    7267           0 :   PyObject *__pyx_v___pyx_state = 0;
    7268             :   #if !CYTHON_METH_FASTCALL
    7269             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    7270             :   #endif
    7271           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    7272           0 :   PyObject* values[1] = {0};
    7273           0 :   int __pyx_lineno = 0;
    7274           0 :   const char *__pyx_filename = NULL;
    7275           0 :   int __pyx_clineno = 0;
    7276           0 :   PyObject *__pyx_r = 0;
    7277             :   __Pyx_RefNannyDeclarations
    7278           0 :   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
    7279             :   #if !CYTHON_METH_FASTCALL
    7280             :   #if CYTHON_ASSUME_SAFE_MACROS
    7281             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    7282             :   #else
    7283             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
    7284             :   #endif
    7285             :   #endif
    7286           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
    7287             :   {
    7288           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    7289           0 :     if (__pyx_kwds) {
    7290           0 :       Py_ssize_t kw_args;
    7291           0 :       switch (__pyx_nargs) {
    7292           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    7293           0 :         CYTHON_FALLTHROUGH;
    7294           0 :         case  0: break;
    7295           0 :         default: goto __pyx_L5_argtuple_error;
    7296             :       }
    7297           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
    7298           0 :       switch (__pyx_nargs) {
    7299             :         case  0:
    7300           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
    7301           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
    7302           0 :           kw_args--;
    7303             :         }
    7304           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
    7305           0 :         else goto __pyx_L5_argtuple_error;
    7306             :       }
    7307           0 :       if (unlikely(kw_args > 0)) {
    7308           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
    7309           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error)
    7310             :       }
    7311           0 :     } else if (unlikely(__pyx_nargs != 1)) {
    7312           0 :       goto __pyx_L5_argtuple_error;
    7313             :     } else {
    7314           0 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    7315             :     }
    7316           0 :     __pyx_v___pyx_state = values[0];
    7317             :   }
    7318           0 :   goto __pyx_L6_skip;
    7319           0 :   __pyx_L5_argtuple_error:;
    7320           0 :   __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
    7321           0 :   __pyx_L6_skip:;
    7322           0 :   goto __pyx_L4_argument_unpacking_done;
    7323           0 :   __pyx_L3_error:;
    7324             :   {
    7325           0 :     Py_ssize_t __pyx_temp;
    7326           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    7327             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    7328             :     }
    7329             :   }
    7330           0 :   __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7331           0 :   __Pyx_RefNannyFinishContext();
    7332           0 :   return NULL;
    7333           0 :   __pyx_L4_argument_unpacking_done:;
    7334           0 :   __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v___pyx_state);
    7335             : 
    7336             :   /* function exit code */
    7337             :   {
    7338           0 :     Py_ssize_t __pyx_temp;
    7339           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    7340             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    7341             :     }
    7342             :   }
    7343             :   __Pyx_RefNannyFinishContext();
    7344             :   return __pyx_r;
    7345             : }
    7346             : 
    7347           0 : static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
    7348           0 :   PyObject *__pyx_r = NULL;
    7349             :   __Pyx_RefNannyDeclarations
    7350           0 :   PyObject *__pyx_t_1 = NULL;
    7351           0 :   int __pyx_lineno = 0;
    7352           0 :   const char *__pyx_filename = NULL;
    7353           0 :   int __pyx_clineno = 0;
    7354           0 :   __Pyx_RefNannySetupContext("__setstate_cython__", 1);
    7355             : 
    7356             :   /* "(tree fragment)":17
    7357             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
    7358             :  * def __setstate_cython__(self, __pyx_state):
    7359             :  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
    7360             :  */
    7361           0 :   if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error)
    7362           0 :   __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
    7363           0 :   __Pyx_GOTREF(__pyx_t_1);
    7364           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    7365             : 
    7366             :   /* "(tree fragment)":16
    7367             :  *     else:
    7368             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
    7369             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
    7370             :  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
    7371             :  */
    7372             : 
    7373             :   /* function exit code */
    7374           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    7375           0 :   goto __pyx_L0;
    7376           0 :   __pyx_L1_error:;
    7377           0 :   __Pyx_XDECREF(__pyx_t_1);
    7378           0 :   __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7379           0 :   __pyx_r = NULL;
    7380           0 :   __pyx_L0:;
    7381           0 :   __Pyx_XGIVEREF(__pyx_r);
    7382           0 :   __Pyx_RefNannyFinishContext();
    7383           0 :   return __pyx_r;
    7384             : }
    7385             : 
    7386             : /* "View.MemoryView":349
    7387             :  *     cdef __Pyx_TypeInfo *typeinfo
    7388             :  * 
    7389             :  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
    7390             :  *         self.obj = obj
    7391             :  *         self.flags = flags
    7392             :  */
    7393             : 
    7394             : /* Python wrapper */
    7395             : static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    7396        2302 : static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    7397        2302 :   PyObject *__pyx_v_obj = 0;
    7398        2302 :   int __pyx_v_flags;
    7399        2302 :   int __pyx_v_dtype_is_object;
    7400        2302 :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    7401        2302 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    7402        2302 :   PyObject* values[3] = {0,0,0};
    7403        2302 :   int __pyx_lineno = 0;
    7404        2302 :   const char *__pyx_filename = NULL;
    7405        2302 :   int __pyx_clineno = 0;
    7406        2302 :   int __pyx_r;
    7407             :   __Pyx_RefNannyDeclarations
    7408        2302 :   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
    7409             :   #if CYTHON_ASSUME_SAFE_MACROS
    7410        2302 :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    7411             :   #else
    7412             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
    7413             :   #endif
    7414        2302 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    7415             :   {
    7416        2302 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0};
    7417        2302 :     if (__pyx_kwds) {
    7418           0 :       Py_ssize_t kw_args;
    7419           0 :       switch (__pyx_nargs) {
    7420           0 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
    7421           0 :         CYTHON_FALLTHROUGH;
    7422           0 :         case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    7423           0 :         CYTHON_FALLTHROUGH;
    7424           0 :         case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    7425           0 :         CYTHON_FALLTHROUGH;
    7426           0 :         case  0: break;
    7427           0 :         default: goto __pyx_L5_argtuple_error;
    7428             :       }
    7429           0 :       kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
    7430           0 :       switch (__pyx_nargs) {
    7431           0 :         case  0:
    7432           0 :         if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
    7433           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
    7434           0 :           kw_args--;
    7435             :         }
    7436           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    7437           0 :         else goto __pyx_L5_argtuple_error;
    7438           0 :         CYTHON_FALLTHROUGH;
    7439             :         case  1:
    7440           0 :         if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_flags)) != 0)) {
    7441           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
    7442           0 :           kw_args--;
    7443             :         }
    7444           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    7445             :         else {
    7446           0 :           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(1, 349, __pyx_L3_error)
    7447             :         }
    7448           0 :         CYTHON_FALLTHROUGH;
    7449             :         case  2:
    7450           0 :         if (kw_args > 0) {
    7451           0 :           PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dtype_is_object);
    7452           0 :           if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
    7453           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    7454             :         }
    7455             :       }
    7456           0 :       if (unlikely(kw_args > 0)) {
    7457           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
    7458           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(1, 349, __pyx_L3_error)
    7459             :       }
    7460             :     } else {
    7461        2302 :       switch (__pyx_nargs) {
    7462        2302 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
    7463        2302 :         CYTHON_FALLTHROUGH;
    7464        2302 :         case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    7465        2302 :         values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    7466        2302 :         break;
    7467           0 :         default: goto __pyx_L5_argtuple_error;
    7468             :       }
    7469             :     }
    7470        2302 :     __pyx_v_obj = values[0];
    7471        2302 :     __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    7472        2302 :     if (values[2]) {
    7473        2302 :       __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    7474             :     } else {
    7475             :       __pyx_v_dtype_is_object = ((int)0);
    7476             :     }
    7477             :   }
    7478        2302 :   goto __pyx_L6_skip;
    7479           0 :   __pyx_L5_argtuple_error:;
    7480           0 :   __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 349, __pyx_L3_error)
    7481        2302 :   __pyx_L6_skip:;
    7482        2302 :   goto __pyx_L4_argument_unpacking_done;
    7483           0 :   __pyx_L3_error:;
    7484             :   {
    7485           0 :     Py_ssize_t __pyx_temp;
    7486           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    7487             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    7488             :     }
    7489             :   }
    7490           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7491           0 :   __Pyx_RefNannyFinishContext();
    7492           0 :   return -1;
    7493        2302 :   __pyx_L4_argument_unpacking_done:;
    7494        2302 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);
    7495             : 
    7496             :   /* function exit code */
    7497             :   {
    7498        2302 :     Py_ssize_t __pyx_temp;
    7499        2302 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    7500             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    7501             :     }
    7502             :   }
    7503             :   __Pyx_RefNannyFinishContext();
    7504             :   return __pyx_r;
    7505             : }
    7506             : 
    7507        2302 : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) {
    7508        2302 :   int __pyx_r;
    7509             :   __Pyx_RefNannyDeclarations
    7510        2302 :   int __pyx_t_1;
    7511        2302 :   int __pyx_t_2;
    7512        2302 :   int __pyx_t_3;
    7513        2302 :   Py_intptr_t __pyx_t_4;
    7514        2302 :   size_t __pyx_t_5;
    7515        2302 :   int __pyx_lineno = 0;
    7516        2302 :   const char *__pyx_filename = NULL;
    7517        2302 :   int __pyx_clineno = 0;
    7518        2302 :   __Pyx_RefNannySetupContext("__cinit__", 1);
    7519             : 
    7520             :   /* "View.MemoryView":350
    7521             :  * 
    7522             :  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
    7523             :  *         self.obj = obj             # <<<<<<<<<<<<<<
    7524             :  *         self.flags = flags
    7525             :  *         if type(self) is memoryview or obj is not None:
    7526             :  */
    7527        2302 :   __Pyx_INCREF(__pyx_v_obj);
    7528        2302 :   __Pyx_GIVEREF(__pyx_v_obj);
    7529        2302 :   __Pyx_GOTREF(__pyx_v_self->obj);
    7530        2302 :   __Pyx_DECREF(__pyx_v_self->obj);
    7531        2302 :   __pyx_v_self->obj = __pyx_v_obj;
    7532             : 
    7533             :   /* "View.MemoryView":351
    7534             :  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
    7535             :  *         self.obj = obj
    7536             :  *         self.flags = flags             # <<<<<<<<<<<<<<
    7537             :  *         if type(self) is memoryview or obj is not None:
    7538             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    7539             :  */
    7540        2302 :   __pyx_v_self->flags = __pyx_v_flags;
    7541             : 
    7542             :   /* "View.MemoryView":352
    7543             :  *         self.obj = obj
    7544             :  *         self.flags = flags
    7545             :  *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
    7546             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    7547             :  *             if <PyObject *> self.view.obj == NULL:
    7548             :  */
    7549        2302 :   __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));
    7550        2302 :   if (!__pyx_t_2) {
    7551         338 :   } else {
    7552        1964 :     __pyx_t_1 = __pyx_t_2;
    7553        1964 :     goto __pyx_L4_bool_binop_done;
    7554             :   }
    7555         338 :   __pyx_t_2 = (__pyx_v_obj != Py_None);
    7556         338 :   __pyx_t_1 = __pyx_t_2;
    7557        2302 :   __pyx_L4_bool_binop_done:;
    7558        2302 :   if (__pyx_t_1) {
    7559             : 
    7560             :     /* "View.MemoryView":353
    7561             :  *         self.flags = flags
    7562             :  *         if type(self) is memoryview or obj is not None:
    7563             :  *             __Pyx_GetBuffer(obj, &self.view, flags)             # <<<<<<<<<<<<<<
    7564             :  *             if <PyObject *> self.view.obj == NULL:
    7565             :  *                 (<__pyx_buffer *> &self.view).obj = Py_None
    7566             :  */
    7567        1964 :     __pyx_t_3 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 353, __pyx_L1_error)
    7568             : 
    7569             :     /* "View.MemoryView":354
    7570             :  *         if type(self) is memoryview or obj is not None:
    7571             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    7572             :  *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
    7573             :  *                 (<__pyx_buffer *> &self.view).obj = Py_None
    7574             :  *                 Py_INCREF(Py_None)
    7575             :  */
    7576        1964 :     __pyx_t_1 = (((PyObject *)__pyx_v_self->view.obj) == NULL);
    7577        1964 :     if (__pyx_t_1) {
    7578             : 
    7579             :       /* "View.MemoryView":355
    7580             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    7581             :  *             if <PyObject *> self.view.obj == NULL:
    7582             :  *                 (<__pyx_buffer *> &self.view).obj = Py_None             # <<<<<<<<<<<<<<
    7583             :  *                 Py_INCREF(Py_None)
    7584             :  * 
    7585             :  */
    7586           0 :       ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;
    7587             : 
    7588             :       /* "View.MemoryView":356
    7589             :  *             if <PyObject *> self.view.obj == NULL:
    7590             :  *                 (<__pyx_buffer *> &self.view).obj = Py_None
    7591             :  *                 Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
    7592             :  * 
    7593             :  *         if not __PYX_CYTHON_ATOMICS_ENABLED():
    7594             :  */
    7595           0 :       Py_INCREF(Py_None);
    7596             : 
    7597             :       /* "View.MemoryView":354
    7598             :  *         if type(self) is memoryview or obj is not None:
    7599             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    7600             :  *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
    7601             :  *                 (<__pyx_buffer *> &self.view).obj = Py_None
    7602             :  *                 Py_INCREF(Py_None)
    7603             :  */
    7604             :     }
    7605             : 
    7606             :     /* "View.MemoryView":352
    7607             :  *         self.obj = obj
    7608             :  *         self.flags = flags
    7609             :  *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
    7610             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    7611             :  *             if <PyObject *> self.view.obj == NULL:
    7612             :  */
    7613             :   }
    7614             : 
    7615             :   /* "View.MemoryView":358
    7616             :  *                 Py_INCREF(Py_None)
    7617             :  * 
    7618             :  *         if not __PYX_CYTHON_ATOMICS_ENABLED():             # <<<<<<<<<<<<<<
    7619             :  *             global __pyx_memoryview_thread_locks_used
    7620             :  *             if __pyx_memoryview_thread_locks_used < 8:
    7621             :  */
    7622        2302 :   __pyx_t_1 = (!__PYX_CYTHON_ATOMICS_ENABLED());
    7623        2302 :   if (__pyx_t_1) {
    7624             : 
    7625             :     /* "View.MemoryView":360
    7626             :  *         if not __PYX_CYTHON_ATOMICS_ENABLED():
    7627             :  *             global __pyx_memoryview_thread_locks_used
    7628             :  *             if __pyx_memoryview_thread_locks_used < 8:             # <<<<<<<<<<<<<<
    7629             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
    7630             :  *                 __pyx_memoryview_thread_locks_used += 1
    7631             :  */
    7632             :     __pyx_t_1 = (__pyx_memoryview_thread_locks_used < 8);
    7633             :     if (__pyx_t_1) {
    7634             : 
    7635             :       /* "View.MemoryView":361
    7636             :  *             global __pyx_memoryview_thread_locks_used
    7637             :  *             if __pyx_memoryview_thread_locks_used < 8:
    7638             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]             # <<<<<<<<<<<<<<
    7639             :  *                 __pyx_memoryview_thread_locks_used += 1
    7640             :  *             if self.lock is NULL:
    7641             :  */
    7642             :       __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
    7643             : 
    7644             :       /* "View.MemoryView":362
    7645             :  *             if __pyx_memoryview_thread_locks_used < 8:
    7646             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
    7647             :  *                 __pyx_memoryview_thread_locks_used += 1             # <<<<<<<<<<<<<<
    7648             :  *             if self.lock is NULL:
    7649             :  *                 self.lock = PyThread_allocate_lock()
    7650             :  */
    7651             :       __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);
    7652             : 
    7653             :       /* "View.MemoryView":360
    7654             :  *         if not __PYX_CYTHON_ATOMICS_ENABLED():
    7655             :  *             global __pyx_memoryview_thread_locks_used
    7656             :  *             if __pyx_memoryview_thread_locks_used < 8:             # <<<<<<<<<<<<<<
    7657             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
    7658             :  *                 __pyx_memoryview_thread_locks_used += 1
    7659             :  */
    7660             :     }
    7661             : 
    7662             :     /* "View.MemoryView":363
    7663             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
    7664             :  *                 __pyx_memoryview_thread_locks_used += 1
    7665             :  *             if self.lock is NULL:             # <<<<<<<<<<<<<<
    7666             :  *                 self.lock = PyThread_allocate_lock()
    7667             :  *                 if self.lock is NULL:
    7668             :  */
    7669             :     __pyx_t_1 = (__pyx_v_self->lock == NULL);
    7670             :     if (__pyx_t_1) {
    7671             : 
    7672             :       /* "View.MemoryView":364
    7673             :  *                 __pyx_memoryview_thread_locks_used += 1
    7674             :  *             if self.lock is NULL:
    7675             :  *                 self.lock = PyThread_allocate_lock()             # <<<<<<<<<<<<<<
    7676             :  *                 if self.lock is NULL:
    7677             :  *                     raise MemoryError
    7678             :  */
    7679             :       __pyx_v_self->lock = PyThread_allocate_lock();
    7680             : 
    7681             :       /* "View.MemoryView":365
    7682             :  *             if self.lock is NULL:
    7683             :  *                 self.lock = PyThread_allocate_lock()
    7684             :  *                 if self.lock is NULL:             # <<<<<<<<<<<<<<
    7685             :  *                     raise MemoryError
    7686             :  * 
    7687             :  */
    7688             :       __pyx_t_1 = (__pyx_v_self->lock == NULL);
    7689             :       if (unlikely(__pyx_t_1)) {
    7690             : 
    7691             :         /* "View.MemoryView":366
    7692             :  *                 self.lock = PyThread_allocate_lock()
    7693             :  *                 if self.lock is NULL:
    7694             :  *                     raise MemoryError             # <<<<<<<<<<<<<<
    7695             :  * 
    7696             :  *         if flags & PyBUF_FORMAT:
    7697             :  */
    7698             :         PyErr_NoMemory(); __PYX_ERR(1, 366, __pyx_L1_error)
    7699             : 
    7700             :         /* "View.MemoryView":365
    7701             :  *             if self.lock is NULL:
    7702             :  *                 self.lock = PyThread_allocate_lock()
    7703             :  *                 if self.lock is NULL:             # <<<<<<<<<<<<<<
    7704             :  *                     raise MemoryError
    7705             :  * 
    7706             :  */
    7707             :       }
    7708             : 
    7709             :       /* "View.MemoryView":363
    7710             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
    7711             :  *                 __pyx_memoryview_thread_locks_used += 1
    7712             :  *             if self.lock is NULL:             # <<<<<<<<<<<<<<
    7713             :  *                 self.lock = PyThread_allocate_lock()
    7714             :  *                 if self.lock is NULL:
    7715             :  */
    7716             :     }
    7717             : 
    7718             :     /* "View.MemoryView":358
    7719             :  *                 Py_INCREF(Py_None)
    7720             :  * 
    7721             :  *         if not __PYX_CYTHON_ATOMICS_ENABLED():             # <<<<<<<<<<<<<<
    7722             :  *             global __pyx_memoryview_thread_locks_used
    7723             :  *             if __pyx_memoryview_thread_locks_used < 8:
    7724             :  */
    7725             :   }
    7726             : 
    7727             :   /* "View.MemoryView":368
    7728             :  *                     raise MemoryError
    7729             :  * 
    7730             :  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
    7731             :  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
    7732             :  *         else:
    7733             :  */
    7734        2302 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
    7735        2302 :   if (__pyx_t_1) {
    7736             : 
    7737             :     /* "View.MemoryView":369
    7738             :  * 
    7739             :  *         if flags & PyBUF_FORMAT:
    7740             :  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')             # <<<<<<<<<<<<<<
    7741             :  *         else:
    7742             :  *             self.dtype_is_object = dtype_is_object
    7743             :  */
    7744        1964 :     __pyx_t_2 = ((__pyx_v_self->view.format[0]) == 'O');
    7745        1964 :     if (__pyx_t_2) {
    7746           0 :     } else {
    7747        1964 :       __pyx_t_1 = __pyx_t_2;
    7748        1964 :       goto __pyx_L12_bool_binop_done;
    7749             :     }
    7750           0 :     __pyx_t_2 = ((__pyx_v_self->view.format[1]) == '\x00');
    7751           0 :     __pyx_t_1 = __pyx_t_2;
    7752        1964 :     __pyx_L12_bool_binop_done:;
    7753        1964 :     __pyx_v_self->dtype_is_object = __pyx_t_1;
    7754             : 
    7755             :     /* "View.MemoryView":368
    7756             :  *                     raise MemoryError
    7757             :  * 
    7758             :  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
    7759             :  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
    7760             :  *         else:
    7761             :  */
    7762        1964 :     goto __pyx_L11;
    7763             :   }
    7764             : 
    7765             :   /* "View.MemoryView":371
    7766             :  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
    7767             :  *         else:
    7768             :  *             self.dtype_is_object = dtype_is_object             # <<<<<<<<<<<<<<
    7769             :  * 
    7770             :  *         assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0
    7771             :  */
    7772             :   /*else*/ {
    7773         338 :     __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
    7774             :   }
    7775        2302 :   __pyx_L11:;
    7776             : 
    7777             :   /* "View.MemoryView":373
    7778             :  *             self.dtype_is_object = dtype_is_object
    7779             :  * 
    7780             :  *         assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0             # <<<<<<<<<<<<<<
    7781             :  *         self.typeinfo = NULL
    7782             :  * 
    7783             :  */
    7784             :   #ifndef CYTHON_WITHOUT_ASSERTIONS
    7785        2302 :   if (unlikely(__pyx_assertions_enabled())) {
    7786        2302 :     __pyx_t_4 = ((Py_intptr_t)((void *)(&__pyx_v_self->acquisition_count)));
    7787        2302 :     __pyx_t_5 = (sizeof(__pyx_atomic_int_type));
    7788        2302 :     if (unlikely(__pyx_t_5 == 0)) {
    7789             :       PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    7790             :       __PYX_ERR(1, 373, __pyx_L1_error)
    7791             :     }
    7792        2302 :     __pyx_t_1 = ((__pyx_t_4 % __pyx_t_5) == 0);
    7793        2302 :     if (unlikely(!__pyx_t_1)) {
    7794           0 :       __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
    7795           0 :       __PYX_ERR(1, 373, __pyx_L1_error)
    7796             :     }
    7797             :   }
    7798             :   #else
    7799             :   if ((1)); else __PYX_ERR(1, 373, __pyx_L1_error)
    7800             :   #endif
    7801             : 
    7802             :   /* "View.MemoryView":374
    7803             :  * 
    7804             :  *         assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0
    7805             :  *         self.typeinfo = NULL             # <<<<<<<<<<<<<<
    7806             :  * 
    7807             :  *     def __dealloc__(memoryview self):
    7808             :  */
    7809        2302 :   __pyx_v_self->typeinfo = NULL;
    7810             : 
    7811             :   /* "View.MemoryView":349
    7812             :  *     cdef __Pyx_TypeInfo *typeinfo
    7813             :  * 
    7814             :  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
    7815             :  *         self.obj = obj
    7816             :  *         self.flags = flags
    7817             :  */
    7818             : 
    7819             :   /* function exit code */
    7820        2302 :   __pyx_r = 0;
    7821        2302 :   goto __pyx_L0;
    7822           0 :   __pyx_L1_error:;
    7823           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7824           0 :   __pyx_r = -1;
    7825        2302 :   __pyx_L0:;
    7826        2302 :   __Pyx_RefNannyFinishContext();
    7827        2302 :   return __pyx_r;
    7828             : }
    7829             : 
    7830             : /* "View.MemoryView":376
    7831             :  *         self.typeinfo = NULL
    7832             :  * 
    7833             :  *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
    7834             :  *         if self.obj is not None:
    7835             :  *             __Pyx_ReleaseBuffer(&self.view)
    7836             :  */
    7837             : 
    7838             : /* Python wrapper */
    7839             : static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
    7840        2302 : static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
    7841        2302 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    7842             :   __Pyx_RefNannyDeclarations
    7843        2302 :   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
    7844        2302 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    7845        2302 :   __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));
    7846             : 
    7847             :   /* function exit code */
    7848        2302 :   __Pyx_RefNannyFinishContext();
    7849             : }
    7850             : 
    7851        2302 : static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
    7852        2302 :   int __pyx_v_i;
    7853        2302 :   int __pyx_t_1;
    7854        2302 :   int __pyx_t_2;
    7855        2302 :   int __pyx_t_3;
    7856        2302 :   int __pyx_t_4;
    7857        2302 :   PyThread_type_lock __pyx_t_5;
    7858        2302 :   PyThread_type_lock __pyx_t_6;
    7859             : 
    7860             :   /* "View.MemoryView":377
    7861             :  * 
    7862             :  *     def __dealloc__(memoryview self):
    7863             :  *         if self.obj is not None:             # <<<<<<<<<<<<<<
    7864             :  *             __Pyx_ReleaseBuffer(&self.view)
    7865             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
    7866             :  */
    7867        2302 :   __pyx_t_1 = (__pyx_v_self->obj != Py_None);
    7868        2302 :   if (__pyx_t_1) {
    7869             : 
    7870             :     /* "View.MemoryView":378
    7871             :  *     def __dealloc__(memoryview self):
    7872             :  *         if self.obj is not None:
    7873             :  *             __Pyx_ReleaseBuffer(&self.view)             # <<<<<<<<<<<<<<
    7874             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
    7875             :  * 
    7876             :  */
    7877        1964 :     __Pyx_ReleaseBuffer((&__pyx_v_self->view));
    7878             : 
    7879             :     /* "View.MemoryView":377
    7880             :  * 
    7881             :  *     def __dealloc__(memoryview self):
    7882             :  *         if self.obj is not None:             # <<<<<<<<<<<<<<
    7883             :  *             __Pyx_ReleaseBuffer(&self.view)
    7884             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
    7885             :  */
    7886        1964 :     goto __pyx_L3;
    7887             :   }
    7888             : 
    7889             :   /* "View.MemoryView":379
    7890             :  *         if self.obj is not None:
    7891             :  *             __Pyx_ReleaseBuffer(&self.view)
    7892             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<
    7893             :  * 
    7894             :  *             (<__pyx_buffer *> &self.view).obj = NULL
    7895             :  */
    7896         338 :   __pyx_t_1 = (((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None);
    7897         338 :   if (__pyx_t_1) {
    7898             : 
    7899             :     /* "View.MemoryView":381
    7900             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
    7901             :  * 
    7902             :  *             (<__pyx_buffer *> &self.view).obj = NULL             # <<<<<<<<<<<<<<
    7903             :  *             Py_DECREF(Py_None)
    7904             :  * 
    7905             :  */
    7906         338 :     ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;
    7907             : 
    7908             :     /* "View.MemoryView":382
    7909             :  * 
    7910             :  *             (<__pyx_buffer *> &self.view).obj = NULL
    7911             :  *             Py_DECREF(Py_None)             # <<<<<<<<<<<<<<
    7912             :  * 
    7913             :  *         cdef int i
    7914             :  */
    7915         338 :     Py_DECREF(Py_None);
    7916             : 
    7917             :     /* "View.MemoryView":379
    7918             :  *         if self.obj is not None:
    7919             :  *             __Pyx_ReleaseBuffer(&self.view)
    7920             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<
    7921             :  * 
    7922             :  *             (<__pyx_buffer *> &self.view).obj = NULL
    7923             :  */
    7924             :   }
    7925           0 :   __pyx_L3:;
    7926             : 
    7927             :   /* "View.MemoryView":386
    7928             :  *         cdef int i
    7929             :  *         global __pyx_memoryview_thread_locks_used
    7930             :  *         if self.lock != NULL:             # <<<<<<<<<<<<<<
    7931             :  *             for i in range(__pyx_memoryview_thread_locks_used):
    7932             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    7933             :  */
    7934        2302 :   __pyx_t_1 = (__pyx_v_self->lock != NULL);
    7935        2302 :   if (__pyx_t_1) {
    7936             : 
    7937             :     /* "View.MemoryView":387
    7938             :  *         global __pyx_memoryview_thread_locks_used
    7939             :  *         if self.lock != NULL:
    7940             :  *             for i in range(__pyx_memoryview_thread_locks_used):             # <<<<<<<<<<<<<<
    7941             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    7942             :  *                     __pyx_memoryview_thread_locks_used -= 1
    7943             :  */
    7944           0 :     __pyx_t_2 = __pyx_memoryview_thread_locks_used;
    7945           0 :     __pyx_t_3 = __pyx_t_2;
    7946           0 :     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    7947           0 :       __pyx_v_i = __pyx_t_4;
    7948             : 
    7949             :       /* "View.MemoryView":388
    7950             :  *         if self.lock != NULL:
    7951             :  *             for i in range(__pyx_memoryview_thread_locks_used):
    7952             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
    7953             :  *                     __pyx_memoryview_thread_locks_used -= 1
    7954             :  *                     if i != __pyx_memoryview_thread_locks_used:
    7955             :  */
    7956           0 :       __pyx_t_1 = ((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock);
    7957           0 :       if (__pyx_t_1) {
    7958             : 
    7959             :         /* "View.MemoryView":389
    7960             :  *             for i in range(__pyx_memoryview_thread_locks_used):
    7961             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    7962             :  *                     __pyx_memoryview_thread_locks_used -= 1             # <<<<<<<<<<<<<<
    7963             :  *                     if i != __pyx_memoryview_thread_locks_used:
    7964             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
    7965             :  */
    7966           0 :         __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);
    7967             : 
    7968             :         /* "View.MemoryView":390
    7969             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    7970             :  *                     __pyx_memoryview_thread_locks_used -= 1
    7971             :  *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
    7972             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
    7973             :  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
    7974             :  */
    7975           0 :         __pyx_t_1 = (__pyx_v_i != __pyx_memoryview_thread_locks_used);
    7976           0 :         if (__pyx_t_1) {
    7977             : 
    7978             :           /* "View.MemoryView":392
    7979             :  *                     if i != __pyx_memoryview_thread_locks_used:
    7980             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
    7981             :  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])             # <<<<<<<<<<<<<<
    7982             :  *                     break
    7983             :  *             else:
    7984             :  */
    7985           0 :           __pyx_t_5 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
    7986           0 :           __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
    7987             : 
    7988             :           /* "View.MemoryView":391
    7989             :  *                     __pyx_memoryview_thread_locks_used -= 1
    7990             :  *                     if i != __pyx_memoryview_thread_locks_used:
    7991             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (             # <<<<<<<<<<<<<<
    7992             :  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
    7993             :  *                     break
    7994             :  */
    7995           0 :           (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_5;
    7996           0 :           (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_6;
    7997             : 
    7998             :           /* "View.MemoryView":390
    7999             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    8000             :  *                     __pyx_memoryview_thread_locks_used -= 1
    8001             :  *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
    8002             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
    8003             :  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
    8004             :  */
    8005             :         }
    8006             : 
    8007             :         /* "View.MemoryView":393
    8008             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
    8009             :  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
    8010             :  *                     break             # <<<<<<<<<<<<<<
    8011             :  *             else:
    8012             :  *                 PyThread_free_lock(self.lock)
    8013             :  */
    8014           0 :         goto __pyx_L6_break;
    8015             : 
    8016             :         /* "View.MemoryView":388
    8017             :  *         if self.lock != NULL:
    8018             :  *             for i in range(__pyx_memoryview_thread_locks_used):
    8019             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
    8020             :  *                     __pyx_memoryview_thread_locks_used -= 1
    8021             :  *                     if i != __pyx_memoryview_thread_locks_used:
    8022             :  */
    8023             :       }
    8024             :     }
    8025             :     /*else*/ {
    8026             : 
    8027             :       /* "View.MemoryView":395
    8028             :  *                     break
    8029             :  *             else:
    8030             :  *                 PyThread_free_lock(self.lock)             # <<<<<<<<<<<<<<
    8031             :  * 
    8032             :  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
    8033             :  */
    8034           0 :       PyThread_free_lock(__pyx_v_self->lock);
    8035             :     }
    8036        2302 :     __pyx_L6_break:;
    8037             : 
    8038             :     /* "View.MemoryView":386
    8039             :  *         cdef int i
    8040             :  *         global __pyx_memoryview_thread_locks_used
    8041             :  *         if self.lock != NULL:             # <<<<<<<<<<<<<<
    8042             :  *             for i in range(__pyx_memoryview_thread_locks_used):
    8043             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    8044             :  */
    8045             :   }
    8046             : 
    8047             :   /* "View.MemoryView":376
    8048             :  *         self.typeinfo = NULL
    8049             :  * 
    8050             :  *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
    8051             :  *         if self.obj is not None:
    8052             :  *             __Pyx_ReleaseBuffer(&self.view)
    8053             :  */
    8054             : 
    8055             :   /* function exit code */
    8056        2302 : }
    8057             : 
    8058             : /* "View.MemoryView":397
    8059             :  *                 PyThread_free_lock(self.lock)
    8060             :  * 
    8061             :  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
    8062             :  *         cdef Py_ssize_t dim
    8063             :  *         cdef char *itemp = <char *> self.view.buf
    8064             :  */
    8065             : 
    8066           0 : static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
    8067           0 :   Py_ssize_t __pyx_v_dim;
    8068           0 :   char *__pyx_v_itemp;
    8069           0 :   PyObject *__pyx_v_idx = NULL;
    8070           0 :   char *__pyx_r;
    8071             :   __Pyx_RefNannyDeclarations
    8072           0 :   Py_ssize_t __pyx_t_1;
    8073           0 :   PyObject *__pyx_t_2 = NULL;
    8074           0 :   Py_ssize_t __pyx_t_3;
    8075           0 :   PyObject *(*__pyx_t_4)(PyObject *);
    8076           0 :   PyObject *__pyx_t_5 = NULL;
    8077           0 :   Py_ssize_t __pyx_t_6;
    8078           0 :   char *__pyx_t_7;
    8079           0 :   int __pyx_lineno = 0;
    8080           0 :   const char *__pyx_filename = NULL;
    8081           0 :   int __pyx_clineno = 0;
    8082           0 :   __Pyx_RefNannySetupContext("get_item_pointer", 1);
    8083             : 
    8084             :   /* "View.MemoryView":399
    8085             :  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
    8086             :  *         cdef Py_ssize_t dim
    8087             :  *         cdef char *itemp = <char *> self.view.buf             # <<<<<<<<<<<<<<
    8088             :  * 
    8089             :  *         for dim, idx in enumerate(index):
    8090             :  */
    8091           0 :   __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);
    8092             : 
    8093             :   /* "View.MemoryView":401
    8094             :  *         cdef char *itemp = <char *> self.view.buf
    8095             :  * 
    8096             :  *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
    8097             :  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
    8098             :  * 
    8099             :  */
    8100           0 :   __pyx_t_1 = 0;
    8101           0 :   if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
    8102           0 :     __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2);
    8103           0 :     __pyx_t_3 = 0;
    8104           0 :     __pyx_t_4 = NULL;
    8105             :   } else {
    8106           0 :     __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 401, __pyx_L1_error)
    8107           0 :     __Pyx_GOTREF(__pyx_t_2);
    8108           0 :     __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 401, __pyx_L1_error)
    8109             :   }
    8110           0 :   for (;;) {
    8111           0 :     if (likely(!__pyx_t_4)) {
    8112           0 :       if (likely(PyList_CheckExact(__pyx_t_2))) {
    8113             :         {
    8114           0 :           Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
    8115             :           #if !CYTHON_ASSUME_SAFE_MACROS
    8116             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
    8117             :           #endif
    8118           0 :           if (__pyx_t_3 >= __pyx_temp) break;
    8119             :         }
    8120             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    8121           0 :         __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
    8122             :         #else
    8123             :         __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 401, __pyx_L1_error)
    8124             :         __Pyx_GOTREF(__pyx_t_5);
    8125             :         #endif
    8126             :       } else {
    8127             :         {
    8128           0 :           Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
    8129             :           #if !CYTHON_ASSUME_SAFE_MACROS
    8130             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
    8131             :           #endif
    8132           0 :           if (__pyx_t_3 >= __pyx_temp) break;
    8133             :         }
    8134             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    8135           0 :         __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
    8136             :         #else
    8137             :         __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 401, __pyx_L1_error)
    8138             :         __Pyx_GOTREF(__pyx_t_5);
    8139             :         #endif
    8140             :       }
    8141             :     } else {
    8142           0 :       __pyx_t_5 = __pyx_t_4(__pyx_t_2);
    8143           0 :       if (unlikely(!__pyx_t_5)) {
    8144           0 :         PyObject* exc_type = PyErr_Occurred();
    8145           0 :         if (exc_type) {
    8146           0 :           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
    8147           0 :           else __PYX_ERR(1, 401, __pyx_L1_error)
    8148             :         }
    8149             :         break;
    8150             :       }
    8151           0 :       __Pyx_GOTREF(__pyx_t_5);
    8152             :     }
    8153           0 :     __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
    8154           0 :     __pyx_t_5 = 0;
    8155           0 :     __pyx_v_dim = __pyx_t_1;
    8156           0 :     __pyx_t_1 = (__pyx_t_1 + 1);
    8157             : 
    8158             :     /* "View.MemoryView":402
    8159             :  * 
    8160             :  *         for dim, idx in enumerate(index):
    8161             :  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)             # <<<<<<<<<<<<<<
    8162             :  * 
    8163             :  *         return itemp
    8164             :  */
    8165           0 :     __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 402, __pyx_L1_error)
    8166           0 :     __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(1, 402, __pyx_L1_error)
    8167             :     __pyx_v_itemp = __pyx_t_7;
    8168             : 
    8169             :     /* "View.MemoryView":401
    8170             :  *         cdef char *itemp = <char *> self.view.buf
    8171             :  * 
    8172             :  *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
    8173             :  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
    8174             :  * 
    8175             :  */
    8176             :   }
    8177           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    8178             : 
    8179             :   /* "View.MemoryView":404
    8180             :  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
    8181             :  * 
    8182             :  *         return itemp             # <<<<<<<<<<<<<<
    8183             :  * 
    8184             :  * 
    8185             :  */
    8186           0 :   __pyx_r = __pyx_v_itemp;
    8187           0 :   goto __pyx_L0;
    8188             : 
    8189             :   /* "View.MemoryView":397
    8190             :  *                 PyThread_free_lock(self.lock)
    8191             :  * 
    8192             :  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
    8193             :  *         cdef Py_ssize_t dim
    8194             :  *         cdef char *itemp = <char *> self.view.buf
    8195             :  */
    8196             : 
    8197             :   /* function exit code */
    8198           0 :   __pyx_L1_error:;
    8199           0 :   __Pyx_XDECREF(__pyx_t_2);
    8200           0 :   __Pyx_XDECREF(__pyx_t_5);
    8201           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8202           0 :   __pyx_r = NULL;
    8203           0 :   __pyx_L0:;
    8204           0 :   __Pyx_XDECREF(__pyx_v_idx);
    8205           0 :   __Pyx_RefNannyFinishContext();
    8206           0 :   return __pyx_r;
    8207             : }
    8208             : 
    8209             : /* "View.MemoryView":407
    8210             :  * 
    8211             :  * 
    8212             :  *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
    8213             :  *         if index is Ellipsis:
    8214             :  *             return self
    8215             :  */
    8216             : 
    8217             : /* Python wrapper */
    8218             : static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
    8219           0 : static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
    8220           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    8221           0 :   PyObject *__pyx_r = 0;
    8222             :   __Pyx_RefNannyDeclarations
    8223           0 :   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
    8224           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    8225           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));
    8226             : 
    8227             :   /* function exit code */
    8228           0 :   __Pyx_RefNannyFinishContext();
    8229           0 :   return __pyx_r;
    8230             : }
    8231             : 
    8232           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
    8233           0 :   PyObject *__pyx_v_have_slices = NULL;
    8234           0 :   PyObject *__pyx_v_indices = NULL;
    8235           0 :   char *__pyx_v_itemp;
    8236           0 :   PyObject *__pyx_r = NULL;
    8237             :   __Pyx_RefNannyDeclarations
    8238           0 :   int __pyx_t_1;
    8239           0 :   PyObject *__pyx_t_2 = NULL;
    8240           0 :   PyObject *__pyx_t_3 = NULL;
    8241           0 :   PyObject *__pyx_t_4 = NULL;
    8242           0 :   char *__pyx_t_5;
    8243           0 :   int __pyx_lineno = 0;
    8244           0 :   const char *__pyx_filename = NULL;
    8245           0 :   int __pyx_clineno = 0;
    8246           0 :   __Pyx_RefNannySetupContext("__getitem__", 1);
    8247             : 
    8248             :   /* "View.MemoryView":408
    8249             :  * 
    8250             :  *     def __getitem__(memoryview self, object index):
    8251             :  *         if index is Ellipsis:             # <<<<<<<<<<<<<<
    8252             :  *             return self
    8253             :  * 
    8254             :  */
    8255           0 :   __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
    8256           0 :   if (__pyx_t_1) {
    8257             : 
    8258             :     /* "View.MemoryView":409
    8259             :  *     def __getitem__(memoryview self, object index):
    8260             :  *         if index is Ellipsis:
    8261             :  *             return self             # <<<<<<<<<<<<<<
    8262             :  * 
    8263             :  *         have_slices, indices = _unellipsify(index, self.view.ndim)
    8264             :  */
    8265           0 :     __Pyx_XDECREF(__pyx_r);
    8266           0 :     __Pyx_INCREF((PyObject *)__pyx_v_self);
    8267           0 :     __pyx_r = ((PyObject *)__pyx_v_self);
    8268           0 :     goto __pyx_L0;
    8269             : 
    8270             :     /* "View.MemoryView":408
    8271             :  * 
    8272             :  *     def __getitem__(memoryview self, object index):
    8273             :  *         if index is Ellipsis:             # <<<<<<<<<<<<<<
    8274             :  *             return self
    8275             :  * 
    8276             :  */
    8277             :   }
    8278             : 
    8279             :   /* "View.MemoryView":411
    8280             :  *             return self
    8281             :  * 
    8282             :  *         have_slices, indices = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
    8283             :  * 
    8284             :  *         cdef char *itemp
    8285             :  */
    8286           0 :   __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 411, __pyx_L1_error)
    8287           0 :   __Pyx_GOTREF(__pyx_t_2);
    8288           0 :   if (likely(__pyx_t_2 != Py_None)) {
    8289           0 :     PyObject* sequence = __pyx_t_2;
    8290           0 :     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    8291           0 :     if (unlikely(size != 2)) {
    8292           0 :       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
    8293           0 :       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
    8294           0 :       __PYX_ERR(1, 411, __pyx_L1_error)
    8295             :     }
    8296             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    8297           0 :     __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
    8298           0 :     __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    8299           0 :     __Pyx_INCREF(__pyx_t_3);
    8300           0 :     __Pyx_INCREF(__pyx_t_4);
    8301             :     #else
    8302             :     __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 411, __pyx_L1_error)
    8303             :     __Pyx_GOTREF(__pyx_t_3);
    8304             :     __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 411, __pyx_L1_error)
    8305             :     __Pyx_GOTREF(__pyx_t_4);
    8306             :     #endif
    8307           0 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    8308             :   } else {
    8309           0 :     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 411, __pyx_L1_error)
    8310             :   }
    8311           0 :   __pyx_v_have_slices = __pyx_t_3;
    8312           0 :   __pyx_t_3 = 0;
    8313           0 :   __pyx_v_indices = __pyx_t_4;
    8314           0 :   __pyx_t_4 = 0;
    8315             : 
    8316             :   /* "View.MemoryView":414
    8317             :  * 
    8318             :  *         cdef char *itemp
    8319             :  *         if have_slices:             # <<<<<<<<<<<<<<
    8320             :  *             return memview_slice(self, indices)
    8321             :  *         else:
    8322             :  */
    8323           0 :   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 414, __pyx_L1_error)
    8324           0 :   if (__pyx_t_1) {
    8325             : 
    8326             :     /* "View.MemoryView":415
    8327             :  *         cdef char *itemp
    8328             :  *         if have_slices:
    8329             :  *             return memview_slice(self, indices)             # <<<<<<<<<<<<<<
    8330             :  *         else:
    8331             :  *             itemp = self.get_item_pointer(indices)
    8332             :  */
    8333           0 :     __Pyx_XDECREF(__pyx_r);
    8334           0 :     __pyx_t_2 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 415, __pyx_L1_error)
    8335           0 :     __Pyx_GOTREF(__pyx_t_2);
    8336           0 :     __pyx_r = __pyx_t_2;
    8337           0 :     __pyx_t_2 = 0;
    8338           0 :     goto __pyx_L0;
    8339             : 
    8340             :     /* "View.MemoryView":414
    8341             :  * 
    8342             :  *         cdef char *itemp
    8343             :  *         if have_slices:             # <<<<<<<<<<<<<<
    8344             :  *             return memview_slice(self, indices)
    8345             :  *         else:
    8346             :  */
    8347             :   }
    8348             : 
    8349             :   /* "View.MemoryView":417
    8350             :  *             return memview_slice(self, indices)
    8351             :  *         else:
    8352             :  *             itemp = self.get_item_pointer(indices)             # <<<<<<<<<<<<<<
    8353             :  *             return self.convert_item_to_object(itemp)
    8354             :  * 
    8355             :  */
    8356             :   /*else*/ {
    8357           0 :     __pyx_t_5 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_5 == ((char *)NULL))) __PYX_ERR(1, 417, __pyx_L1_error)
    8358           0 :     __pyx_v_itemp = __pyx_t_5;
    8359             : 
    8360             :     /* "View.MemoryView":418
    8361             :  *         else:
    8362             :  *             itemp = self.get_item_pointer(indices)
    8363             :  *             return self.convert_item_to_object(itemp)             # <<<<<<<<<<<<<<
    8364             :  * 
    8365             :  *     def __setitem__(memoryview self, object index, object value):
    8366             :  */
    8367           0 :     __Pyx_XDECREF(__pyx_r);
    8368           0 :     __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 418, __pyx_L1_error)
    8369           0 :     __Pyx_GOTREF(__pyx_t_2);
    8370           0 :     __pyx_r = __pyx_t_2;
    8371           0 :     __pyx_t_2 = 0;
    8372           0 :     goto __pyx_L0;
    8373             :   }
    8374             : 
    8375             :   /* "View.MemoryView":407
    8376             :  * 
    8377             :  * 
    8378             :  *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
    8379             :  *         if index is Ellipsis:
    8380             :  *             return self
    8381             :  */
    8382             : 
    8383             :   /* function exit code */
    8384           0 :   __pyx_L1_error:;
    8385           0 :   __Pyx_XDECREF(__pyx_t_2);
    8386           0 :   __Pyx_XDECREF(__pyx_t_3);
    8387           0 :   __Pyx_XDECREF(__pyx_t_4);
    8388           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8389           0 :   __pyx_r = NULL;
    8390           0 :   __pyx_L0:;
    8391           0 :   __Pyx_XDECREF(__pyx_v_have_slices);
    8392           0 :   __Pyx_XDECREF(__pyx_v_indices);
    8393           0 :   __Pyx_XGIVEREF(__pyx_r);
    8394           0 :   __Pyx_RefNannyFinishContext();
    8395           0 :   return __pyx_r;
    8396             : }
    8397             : 
    8398             : /* "View.MemoryView":420
    8399             :  *             return self.convert_item_to_object(itemp)
    8400             :  * 
    8401             :  *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
    8402             :  *         if self.view.readonly:
    8403             :  *             raise TypeError, "Cannot assign to read-only memoryview"
    8404             :  */
    8405             : 
    8406             : /* Python wrapper */
    8407             : static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
    8408           0 : static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
    8409           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    8410           0 :   int __pyx_r;
    8411             :   __Pyx_RefNannyDeclarations
    8412           0 :   __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
    8413           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    8414           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));
    8415             : 
    8416             :   /* function exit code */
    8417           0 :   __Pyx_RefNannyFinishContext();
    8418           0 :   return __pyx_r;
    8419             : }
    8420             : 
    8421           0 : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
    8422           0 :   PyObject *__pyx_v_have_slices = NULL;
    8423           0 :   PyObject *__pyx_v_obj = NULL;
    8424           0 :   int __pyx_r;
    8425             :   __Pyx_RefNannyDeclarations
    8426           0 :   PyObject *__pyx_t_1 = NULL;
    8427           0 :   PyObject *__pyx_t_2 = NULL;
    8428           0 :   PyObject *__pyx_t_3 = NULL;
    8429           0 :   int __pyx_t_4;
    8430           0 :   int __pyx_lineno = 0;
    8431           0 :   const char *__pyx_filename = NULL;
    8432           0 :   int __pyx_clineno = 0;
    8433           0 :   __Pyx_RefNannySetupContext("__setitem__", 0);
    8434           0 :   __Pyx_INCREF(__pyx_v_index);
    8435             : 
    8436             :   /* "View.MemoryView":421
    8437             :  * 
    8438             :  *     def __setitem__(memoryview self, object index, object value):
    8439             :  *         if self.view.readonly:             # <<<<<<<<<<<<<<
    8440             :  *             raise TypeError, "Cannot assign to read-only memoryview"
    8441             :  * 
    8442             :  */
    8443           0 :   if (unlikely(__pyx_v_self->view.readonly)) {
    8444             : 
    8445             :     /* "View.MemoryView":422
    8446             :  *     def __setitem__(memoryview self, object index, object value):
    8447             :  *         if self.view.readonly:
    8448             :  *             raise TypeError, "Cannot assign to read-only memoryview"             # <<<<<<<<<<<<<<
    8449             :  * 
    8450             :  *         have_slices, index = _unellipsify(index, self.view.ndim)
    8451             :  */
    8452           0 :     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_Cannot_assign_to_read_only_memor, 0, 0);
    8453           0 :     __PYX_ERR(1, 422, __pyx_L1_error)
    8454             : 
    8455             :     /* "View.MemoryView":421
    8456             :  * 
    8457             :  *     def __setitem__(memoryview self, object index, object value):
    8458             :  *         if self.view.readonly:             # <<<<<<<<<<<<<<
    8459             :  *             raise TypeError, "Cannot assign to read-only memoryview"
    8460             :  * 
    8461             :  */
    8462             :   }
    8463             : 
    8464             :   /* "View.MemoryView":424
    8465             :  *             raise TypeError, "Cannot assign to read-only memoryview"
    8466             :  * 
    8467             :  *         have_slices, index = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
    8468             :  * 
    8469             :  *         if have_slices:
    8470             :  */
    8471           0 :   __pyx_t_1 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 424, __pyx_L1_error)
    8472           0 :   __Pyx_GOTREF(__pyx_t_1);
    8473           0 :   if (likely(__pyx_t_1 != Py_None)) {
    8474           0 :     PyObject* sequence = __pyx_t_1;
    8475           0 :     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    8476           0 :     if (unlikely(size != 2)) {
    8477           0 :       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
    8478           0 :       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
    8479           0 :       __PYX_ERR(1, 424, __pyx_L1_error)
    8480             :     }
    8481             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    8482           0 :     __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
    8483           0 :     __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    8484           0 :     __Pyx_INCREF(__pyx_t_2);
    8485           0 :     __Pyx_INCREF(__pyx_t_3);
    8486             :     #else
    8487             :     __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 424, __pyx_L1_error)
    8488             :     __Pyx_GOTREF(__pyx_t_2);
    8489             :     __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 424, __pyx_L1_error)
    8490             :     __Pyx_GOTREF(__pyx_t_3);
    8491             :     #endif
    8492           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    8493             :   } else {
    8494           0 :     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 424, __pyx_L1_error)
    8495             :   }
    8496           0 :   __pyx_v_have_slices = __pyx_t_2;
    8497           0 :   __pyx_t_2 = 0;
    8498           0 :   __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_3);
    8499           0 :   __pyx_t_3 = 0;
    8500             : 
    8501             :   /* "View.MemoryView":426
    8502             :  *         have_slices, index = _unellipsify(index, self.view.ndim)
    8503             :  * 
    8504             :  *         if have_slices:             # <<<<<<<<<<<<<<
    8505             :  *             obj = self.is_slice(value)
    8506             :  *             if obj is not None:
    8507             :  */
    8508           0 :   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 426, __pyx_L1_error)
    8509           0 :   if (__pyx_t_4) {
    8510             : 
    8511             :     /* "View.MemoryView":427
    8512             :  * 
    8513             :  *         if have_slices:
    8514             :  *             obj = self.is_slice(value)             # <<<<<<<<<<<<<<
    8515             :  *             if obj is not None:
    8516             :  *                 self.setitem_slice_assignment(self[index], obj)
    8517             :  */
    8518           0 :     __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 427, __pyx_L1_error)
    8519           0 :     __Pyx_GOTREF(__pyx_t_1);
    8520           0 :     __pyx_v_obj = __pyx_t_1;
    8521           0 :     __pyx_t_1 = 0;
    8522             : 
    8523             :     /* "View.MemoryView":428
    8524             :  *         if have_slices:
    8525             :  *             obj = self.is_slice(value)
    8526             :  *             if obj is not None:             # <<<<<<<<<<<<<<
    8527             :  *                 self.setitem_slice_assignment(self[index], obj)
    8528             :  *             else:
    8529             :  */
    8530           0 :     __pyx_t_4 = (__pyx_v_obj != Py_None);
    8531           0 :     if (__pyx_t_4) {
    8532             : 
    8533             :       /* "View.MemoryView":429
    8534             :  *             obj = self.is_slice(value)
    8535             :  *             if obj is not None:
    8536             :  *                 self.setitem_slice_assignment(self[index], obj)             # <<<<<<<<<<<<<<
    8537             :  *             else:
    8538             :  *                 self.setitem_slice_assign_scalar(self[index], value)
    8539             :  */
    8540           0 :       __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 429, __pyx_L1_error)
    8541           0 :       __Pyx_GOTREF(__pyx_t_1);
    8542           0 :       __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_1, __pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 429, __pyx_L1_error)
    8543           0 :       __Pyx_GOTREF(__pyx_t_3);
    8544           0 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    8545           0 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    8546             : 
    8547             :       /* "View.MemoryView":428
    8548             :  *         if have_slices:
    8549             :  *             obj = self.is_slice(value)
    8550             :  *             if obj is not None:             # <<<<<<<<<<<<<<
    8551             :  *                 self.setitem_slice_assignment(self[index], obj)
    8552             :  *             else:
    8553             :  */
    8554           0 :       goto __pyx_L5;
    8555             :     }
    8556             : 
    8557             :     /* "View.MemoryView":431
    8558             :  *                 self.setitem_slice_assignment(self[index], obj)
    8559             :  *             else:
    8560             :  *                 self.setitem_slice_assign_scalar(self[index], value)             # <<<<<<<<<<<<<<
    8561             :  *         else:
    8562             :  *             self.setitem_indexed(index, value)
    8563             :  */
    8564             :     /*else*/ {
    8565           0 :       __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 431, __pyx_L1_error)
    8566           0 :       __Pyx_GOTREF(__pyx_t_3);
    8567           0 :       if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 431, __pyx_L1_error)
    8568           0 :       __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_3), __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 431, __pyx_L1_error)
    8569           0 :       __Pyx_GOTREF(__pyx_t_1);
    8570           0 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    8571           0 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    8572             :     }
    8573           0 :     __pyx_L5:;
    8574             : 
    8575             :     /* "View.MemoryView":426
    8576             :  *         have_slices, index = _unellipsify(index, self.view.ndim)
    8577             :  * 
    8578             :  *         if have_slices:             # <<<<<<<<<<<<<<
    8579             :  *             obj = self.is_slice(value)
    8580             :  *             if obj is not None:
    8581             :  */
    8582           0 :     goto __pyx_L4;
    8583             :   }
    8584             : 
    8585             :   /* "View.MemoryView":433
    8586             :  *                 self.setitem_slice_assign_scalar(self[index], value)
    8587             :  *         else:
    8588             :  *             self.setitem_indexed(index, value)             # <<<<<<<<<<<<<<
    8589             :  * 
    8590             :  *     cdef is_slice(self, obj):
    8591             :  */
    8592             :   /*else*/ {
    8593           0 :     __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 433, __pyx_L1_error)
    8594           0 :     __Pyx_GOTREF(__pyx_t_1);
    8595           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    8596             :   }
    8597           0 :   __pyx_L4:;
    8598             : 
    8599             :   /* "View.MemoryView":420
    8600             :  *             return self.convert_item_to_object(itemp)
    8601             :  * 
    8602             :  *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
    8603             :  *         if self.view.readonly:
    8604             :  *             raise TypeError, "Cannot assign to read-only memoryview"
    8605             :  */
    8606             : 
    8607             :   /* function exit code */
    8608           0 :   __pyx_r = 0;
    8609           0 :   goto __pyx_L0;
    8610           0 :   __pyx_L1_error:;
    8611           0 :   __Pyx_XDECREF(__pyx_t_1);
    8612           0 :   __Pyx_XDECREF(__pyx_t_2);
    8613           0 :   __Pyx_XDECREF(__pyx_t_3);
    8614           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8615           0 :   __pyx_r = -1;
    8616           0 :   __pyx_L0:;
    8617           0 :   __Pyx_XDECREF(__pyx_v_have_slices);
    8618           0 :   __Pyx_XDECREF(__pyx_v_obj);
    8619           0 :   __Pyx_XDECREF(__pyx_v_index);
    8620           0 :   __Pyx_RefNannyFinishContext();
    8621           0 :   return __pyx_r;
    8622             : }
    8623             : 
    8624             : /* "View.MemoryView":435
    8625             :  *             self.setitem_indexed(index, value)
    8626             :  * 
    8627             :  *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
    8628             :  *         if not isinstance(obj, memoryview):
    8629             :  *             try:
    8630             :  */
    8631             : 
    8632           0 : static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
    8633           0 :   PyObject *__pyx_r = NULL;
    8634             :   __Pyx_RefNannyDeclarations
    8635           0 :   int __pyx_t_1;
    8636           0 :   int __pyx_t_2;
    8637           0 :   PyObject *__pyx_t_3 = NULL;
    8638           0 :   PyObject *__pyx_t_4 = NULL;
    8639           0 :   PyObject *__pyx_t_5 = NULL;
    8640           0 :   PyObject *__pyx_t_6 = NULL;
    8641           0 :   PyObject *__pyx_t_7 = NULL;
    8642           0 :   PyObject *__pyx_t_8 = NULL;
    8643           0 :   int __pyx_t_9;
    8644           0 :   int __pyx_lineno = 0;
    8645           0 :   const char *__pyx_filename = NULL;
    8646           0 :   int __pyx_clineno = 0;
    8647           0 :   __Pyx_RefNannySetupContext("is_slice", 0);
    8648           0 :   __Pyx_INCREF(__pyx_v_obj);
    8649             : 
    8650             :   /* "View.MemoryView":436
    8651             :  * 
    8652             :  *     cdef is_slice(self, obj):
    8653             :  *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
    8654             :  *             try:
    8655             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8656             :  */
    8657           0 :   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type); 
    8658           0 :   __pyx_t_2 = (!__pyx_t_1);
    8659           0 :   if (__pyx_t_2) {
    8660             : 
    8661             :     /* "View.MemoryView":437
    8662             :  *     cdef is_slice(self, obj):
    8663             :  *         if not isinstance(obj, memoryview):
    8664             :  *             try:             # <<<<<<<<<<<<<<
    8665             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8666             :  *                                  self.dtype_is_object)
    8667             :  */
    8668             :     {
    8669           0 :       __Pyx_PyThreadState_declare
    8670           0 :       __Pyx_PyThreadState_assign
    8671           0 :       __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    8672           0 :       __Pyx_XGOTREF(__pyx_t_3);
    8673           0 :       __Pyx_XGOTREF(__pyx_t_4);
    8674           0 :       __Pyx_XGOTREF(__pyx_t_5);
    8675             :       /*try:*/ {
    8676             : 
    8677             :         /* "View.MemoryView":438
    8678             :  *         if not isinstance(obj, memoryview):
    8679             :  *             try:
    8680             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
    8681             :  *                                  self.dtype_is_object)
    8682             :  *             except TypeError:
    8683             :  */
    8684           0 :         __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 438, __pyx_L4_error)
    8685           0 :         __Pyx_GOTREF(__pyx_t_6);
    8686             : 
    8687             :         /* "View.MemoryView":439
    8688             :  *             try:
    8689             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8690             :  *                                  self.dtype_is_object)             # <<<<<<<<<<<<<<
    8691             :  *             except TypeError:
    8692             :  *                 return None
    8693             :  */
    8694           0 :         __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 439, __pyx_L4_error)
    8695           0 :         __Pyx_GOTREF(__pyx_t_7);
    8696             : 
    8697             :         /* "View.MemoryView":438
    8698             :  *         if not isinstance(obj, memoryview):
    8699             :  *             try:
    8700             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
    8701             :  *                                  self.dtype_is_object)
    8702             :  *             except TypeError:
    8703             :  */
    8704           0 :         __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 438, __pyx_L4_error)
    8705           0 :         __Pyx_GOTREF(__pyx_t_8);
    8706           0 :         __Pyx_INCREF(__pyx_v_obj);
    8707           0 :         __Pyx_GIVEREF(__pyx_v_obj);
    8708           0 :         if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj)) __PYX_ERR(1, 438, __pyx_L4_error);
    8709           0 :         __Pyx_GIVEREF(__pyx_t_6);
    8710           0 :         if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6)) __PYX_ERR(1, 438, __pyx_L4_error);
    8711           0 :         __Pyx_GIVEREF(__pyx_t_7);
    8712           0 :         if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7)) __PYX_ERR(1, 438, __pyx_L4_error);
    8713           0 :         __pyx_t_6 = 0;
    8714           0 :         __pyx_t_7 = 0;
    8715           0 :         __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 438, __pyx_L4_error)
    8716           0 :         __Pyx_GOTREF(__pyx_t_7);
    8717           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    8718           0 :         __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
    8719           0 :         __pyx_t_7 = 0;
    8720             : 
    8721             :         /* "View.MemoryView":437
    8722             :  *     cdef is_slice(self, obj):
    8723             :  *         if not isinstance(obj, memoryview):
    8724             :  *             try:             # <<<<<<<<<<<<<<
    8725             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8726             :  *                                  self.dtype_is_object)
    8727             :  */
    8728             :       }
    8729           0 :       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    8730           0 :       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    8731           0 :       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    8732           0 :       goto __pyx_L9_try_end;
    8733           0 :       __pyx_L4_error:;
    8734           0 :       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    8735           0 :       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    8736           0 :       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    8737             : 
    8738             :       /* "View.MemoryView":440
    8739             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8740             :  *                                  self.dtype_is_object)
    8741             :  *             except TypeError:             # <<<<<<<<<<<<<<
    8742             :  *                 return None
    8743             :  * 
    8744             :  */
    8745           0 :       __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
    8746           0 :       if (__pyx_t_9) {
    8747           0 :         __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8748           0 :         if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(1, 440, __pyx_L6_except_error)
    8749           0 :         __Pyx_XGOTREF(__pyx_t_7);
    8750           0 :         __Pyx_XGOTREF(__pyx_t_8);
    8751           0 :         __Pyx_XGOTREF(__pyx_t_6);
    8752             : 
    8753             :         /* "View.MemoryView":441
    8754             :  *                                  self.dtype_is_object)
    8755             :  *             except TypeError:
    8756             :  *                 return None             # <<<<<<<<<<<<<<
    8757             :  * 
    8758             :  *         return obj
    8759             :  */
    8760           0 :         __Pyx_XDECREF(__pyx_r);
    8761           0 :         __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    8762           0 :         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    8763           0 :         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    8764           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    8765           0 :         goto __pyx_L7_except_return;
    8766             :       }
    8767           0 :       goto __pyx_L6_except_error;
    8768             : 
    8769             :       /* "View.MemoryView":437
    8770             :  *     cdef is_slice(self, obj):
    8771             :  *         if not isinstance(obj, memoryview):
    8772             :  *             try:             # <<<<<<<<<<<<<<
    8773             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8774             :  *                                  self.dtype_is_object)
    8775             :  */
    8776           0 :       __pyx_L6_except_error:;
    8777           0 :       __Pyx_XGIVEREF(__pyx_t_3);
    8778           0 :       __Pyx_XGIVEREF(__pyx_t_4);
    8779           0 :       __Pyx_XGIVEREF(__pyx_t_5);
    8780           0 :       __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    8781           0 :       goto __pyx_L1_error;
    8782           0 :       __pyx_L7_except_return:;
    8783           0 :       __Pyx_XGIVEREF(__pyx_t_3);
    8784           0 :       __Pyx_XGIVEREF(__pyx_t_4);
    8785           0 :       __Pyx_XGIVEREF(__pyx_t_5);
    8786           0 :       __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    8787           0 :       goto __pyx_L0;
    8788           0 :       __pyx_L9_try_end:;
    8789             :     }
    8790             : 
    8791             :     /* "View.MemoryView":436
    8792             :  * 
    8793             :  *     cdef is_slice(self, obj):
    8794             :  *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
    8795             :  *             try:
    8796             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8797             :  */
    8798             :   }
    8799             : 
    8800             :   /* "View.MemoryView":443
    8801             :  *                 return None
    8802             :  * 
    8803             :  *         return obj             # <<<<<<<<<<<<<<
    8804             :  * 
    8805             :  *     cdef setitem_slice_assignment(self, dst, src):
    8806             :  */
    8807           0 :   __Pyx_XDECREF(__pyx_r);
    8808           0 :   __Pyx_INCREF(__pyx_v_obj);
    8809           0 :   __pyx_r = __pyx_v_obj;
    8810           0 :   goto __pyx_L0;
    8811             : 
    8812             :   /* "View.MemoryView":435
    8813             :  *             self.setitem_indexed(index, value)
    8814             :  * 
    8815             :  *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
    8816             :  *         if not isinstance(obj, memoryview):
    8817             :  *             try:
    8818             :  */
    8819             : 
    8820             :   /* function exit code */
    8821           0 :   __pyx_L1_error:;
    8822           0 :   __Pyx_XDECREF(__pyx_t_6);
    8823           0 :   __Pyx_XDECREF(__pyx_t_7);
    8824           0 :   __Pyx_XDECREF(__pyx_t_8);
    8825           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8826           0 :   __pyx_r = 0;
    8827           0 :   __pyx_L0:;
    8828           0 :   __Pyx_XDECREF(__pyx_v_obj);
    8829           0 :   __Pyx_XGIVEREF(__pyx_r);
    8830           0 :   __Pyx_RefNannyFinishContext();
    8831           0 :   return __pyx_r;
    8832             : }
    8833             : 
    8834             : /* "View.MemoryView":445
    8835             :  *         return obj
    8836             :  * 
    8837             :  *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
    8838             :  *         cdef __Pyx_memviewslice dst_slice
    8839             :  *         cdef __Pyx_memviewslice src_slice
    8840             :  */
    8841             : 
    8842           0 : static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
    8843           0 :   __Pyx_memviewslice __pyx_v_dst_slice;
    8844           0 :   __Pyx_memviewslice __pyx_v_src_slice;
    8845           0 :   __Pyx_memviewslice __pyx_v_msrc;
    8846           0 :   __Pyx_memviewslice __pyx_v_mdst;
    8847           0 :   PyObject *__pyx_r = NULL;
    8848             :   __Pyx_RefNannyDeclarations
    8849           0 :   __Pyx_memviewslice *__pyx_t_1;
    8850           0 :   PyObject *__pyx_t_2 = NULL;
    8851           0 :   int __pyx_t_3;
    8852           0 :   int __pyx_t_4;
    8853           0 :   int __pyx_t_5;
    8854           0 :   int __pyx_lineno = 0;
    8855           0 :   const char *__pyx_filename = NULL;
    8856           0 :   int __pyx_clineno = 0;
    8857           0 :   __Pyx_RefNannySetupContext("setitem_slice_assignment", 1);
    8858             : 
    8859             :   /* "View.MemoryView":448
    8860             :  *         cdef __Pyx_memviewslice dst_slice
    8861             :  *         cdef __Pyx_memviewslice src_slice
    8862             :  *         cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0]             # <<<<<<<<<<<<<<
    8863             :  *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]
    8864             :  * 
    8865             :  */
    8866           0 :   if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(1, 448, __pyx_L1_error)
    8867           0 :   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 448, __pyx_L1_error)
    8868           0 :   __pyx_v_msrc = (__pyx_t_1[0]);
    8869             : 
    8870             :   /* "View.MemoryView":449
    8871             :  *         cdef __Pyx_memviewslice src_slice
    8872             :  *         cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0]
    8873             :  *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]             # <<<<<<<<<<<<<<
    8874             :  * 
    8875             :  *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
    8876             :  */
    8877           0 :   if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(1, 449, __pyx_L1_error)
    8878           0 :   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 449, __pyx_L1_error)
    8879           0 :   __pyx_v_mdst = (__pyx_t_1[0]);
    8880             : 
    8881             :   /* "View.MemoryView":451
    8882             :  *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]
    8883             :  * 
    8884             :  *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)             # <<<<<<<<<<<<<<
    8885             :  * 
    8886             :  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
    8887             :  */
    8888           0 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 451, __pyx_L1_error)
    8889           0 :   __Pyx_GOTREF(__pyx_t_2);
    8890           0 :   __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 451, __pyx_L1_error)
    8891           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    8892           0 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 451, __pyx_L1_error)
    8893           0 :   __Pyx_GOTREF(__pyx_t_2);
    8894           0 :   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 451, __pyx_L1_error)
    8895           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    8896           0 :   __pyx_t_5 = __pyx_memoryview_copy_contents(__pyx_v_msrc, __pyx_v_mdst, __pyx_t_3, __pyx_t_4, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 451, __pyx_L1_error)
    8897             : 
    8898             :   /* "View.MemoryView":445
    8899             :  *         return obj
    8900             :  * 
    8901             :  *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
    8902             :  *         cdef __Pyx_memviewslice dst_slice
    8903             :  *         cdef __Pyx_memviewslice src_slice
    8904             :  */
    8905             : 
    8906             :   /* function exit code */
    8907           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    8908           0 :   goto __pyx_L0;
    8909           0 :   __pyx_L1_error:;
    8910           0 :   __Pyx_XDECREF(__pyx_t_2);
    8911           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8912           0 :   __pyx_r = 0;
    8913           0 :   __pyx_L0:;
    8914           0 :   __Pyx_XGIVEREF(__pyx_r);
    8915           0 :   __Pyx_RefNannyFinishContext();
    8916           0 :   return __pyx_r;
    8917             : }
    8918             : 
    8919             : /* "View.MemoryView":453
    8920             :  *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
    8921             :  * 
    8922             :  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
    8923             :  *         cdef int array[128]
    8924             :  *         cdef void *tmp = NULL
    8925             :  */
    8926             : 
    8927           0 : static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) {
    8928           0 :   int __pyx_v_array[0x80];
    8929           0 :   void *__pyx_v_tmp;
    8930           0 :   void *__pyx_v_item;
    8931           0 :   __Pyx_memviewslice *__pyx_v_dst_slice;
    8932           0 :   __Pyx_memviewslice __pyx_v_tmp_slice;
    8933           0 :   PyObject *__pyx_r = NULL;
    8934             :   __Pyx_RefNannyDeclarations
    8935           0 :   __Pyx_memviewslice *__pyx_t_1;
    8936           0 :   int __pyx_t_2;
    8937           0 :   PyObject *__pyx_t_3 = NULL;
    8938           0 :   int __pyx_t_4;
    8939           0 :   int __pyx_t_5;
    8940           0 :   char const *__pyx_t_6;
    8941           0 :   PyObject *__pyx_t_7 = NULL;
    8942           0 :   PyObject *__pyx_t_8 = NULL;
    8943           0 :   PyObject *__pyx_t_9 = NULL;
    8944           0 :   PyObject *__pyx_t_10 = NULL;
    8945           0 :   PyObject *__pyx_t_11 = NULL;
    8946           0 :   PyObject *__pyx_t_12 = NULL;
    8947           0 :   int __pyx_lineno = 0;
    8948           0 :   const char *__pyx_filename = NULL;
    8949           0 :   int __pyx_clineno = 0;
    8950           0 :   __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 1);
    8951             : 
    8952             :   /* "View.MemoryView":455
    8953             :  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
    8954             :  *         cdef int array[128]
    8955             :  *         cdef void *tmp = NULL             # <<<<<<<<<<<<<<
    8956             :  *         cdef void *item
    8957             :  * 
    8958             :  */
    8959           0 :   __pyx_v_tmp = NULL;
    8960             : 
    8961             :   /* "View.MemoryView":460
    8962             :  *         cdef __Pyx_memviewslice *dst_slice
    8963             :  *         cdef __Pyx_memviewslice tmp_slice
    8964             :  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)             # <<<<<<<<<<<<<<
    8965             :  * 
    8966             :  *         if <size_t>self.view.itemsize > sizeof(array):
    8967             :  */
    8968           0 :   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 460, __pyx_L1_error)
    8969           0 :   __pyx_v_dst_slice = __pyx_t_1;
    8970             : 
    8971             :   /* "View.MemoryView":462
    8972             :  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
    8973             :  * 
    8974             :  *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
    8975             :  *             tmp = PyMem_Malloc(self.view.itemsize)
    8976             :  *             if tmp == NULL:
    8977             :  */
    8978           0 :   __pyx_t_2 = (((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array)));
    8979           0 :   if (__pyx_t_2) {
    8980             : 
    8981             :     /* "View.MemoryView":463
    8982             :  * 
    8983             :  *         if <size_t>self.view.itemsize > sizeof(array):
    8984             :  *             tmp = PyMem_Malloc(self.view.itemsize)             # <<<<<<<<<<<<<<
    8985             :  *             if tmp == NULL:
    8986             :  *                 raise MemoryError
    8987             :  */
    8988           0 :     __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);
    8989             : 
    8990             :     /* "View.MemoryView":464
    8991             :  *         if <size_t>self.view.itemsize > sizeof(array):
    8992             :  *             tmp = PyMem_Malloc(self.view.itemsize)
    8993             :  *             if tmp == NULL:             # <<<<<<<<<<<<<<
    8994             :  *                 raise MemoryError
    8995             :  *             item = tmp
    8996             :  */
    8997           0 :     __pyx_t_2 = (__pyx_v_tmp == NULL);
    8998           0 :     if (unlikely(__pyx_t_2)) {
    8999             : 
    9000             :       /* "View.MemoryView":465
    9001             :  *             tmp = PyMem_Malloc(self.view.itemsize)
    9002             :  *             if tmp == NULL:
    9003             :  *                 raise MemoryError             # <<<<<<<<<<<<<<
    9004             :  *             item = tmp
    9005             :  *         else:
    9006             :  */
    9007           0 :       PyErr_NoMemory(); __PYX_ERR(1, 465, __pyx_L1_error)
    9008             : 
    9009             :       /* "View.MemoryView":464
    9010             :  *         if <size_t>self.view.itemsize > sizeof(array):
    9011             :  *             tmp = PyMem_Malloc(self.view.itemsize)
    9012             :  *             if tmp == NULL:             # <<<<<<<<<<<<<<
    9013             :  *                 raise MemoryError
    9014             :  *             item = tmp
    9015             :  */
    9016             :     }
    9017             : 
    9018             :     /* "View.MemoryView":466
    9019             :  *             if tmp == NULL:
    9020             :  *                 raise MemoryError
    9021             :  *             item = tmp             # <<<<<<<<<<<<<<
    9022             :  *         else:
    9023             :  *             item = <void *> array
    9024             :  */
    9025           0 :     __pyx_v_item = __pyx_v_tmp;
    9026             : 
    9027             :     /* "View.MemoryView":462
    9028             :  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
    9029             :  * 
    9030             :  *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
    9031             :  *             tmp = PyMem_Malloc(self.view.itemsize)
    9032             :  *             if tmp == NULL:
    9033             :  */
    9034           0 :     goto __pyx_L3;
    9035             :   }
    9036             : 
    9037             :   /* "View.MemoryView":468
    9038             :  *             item = tmp
    9039             :  *         else:
    9040             :  *             item = <void *> array             # <<<<<<<<<<<<<<
    9041             :  * 
    9042             :  *         try:
    9043             :  */
    9044             :   /*else*/ {
    9045             :     __pyx_v_item = ((void *)__pyx_v_array);
    9046             :   }
    9047           0 :   __pyx_L3:;
    9048             : 
    9049             :   /* "View.MemoryView":470
    9050             :  *             item = <void *> array
    9051             :  * 
    9052             :  *         try:             # <<<<<<<<<<<<<<
    9053             :  *             if self.dtype_is_object:
    9054             :  *                 (<PyObject **> item)[0] = <PyObject *> value
    9055             :  */
    9056             :   /*try:*/ {
    9057             : 
    9058             :     /* "View.MemoryView":471
    9059             :  * 
    9060             :  *         try:
    9061             :  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
    9062             :  *                 (<PyObject **> item)[0] = <PyObject *> value
    9063             :  *             else:
    9064             :  */
    9065           0 :     if (__pyx_v_self->dtype_is_object) {
    9066             : 
    9067             :       /* "View.MemoryView":472
    9068             :  *         try:
    9069             :  *             if self.dtype_is_object:
    9070             :  *                 (<PyObject **> item)[0] = <PyObject *> value             # <<<<<<<<<<<<<<
    9071             :  *             else:
    9072             :  *                 self.assign_item_from_object(<char *> item, value)
    9073             :  */
    9074           0 :       (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);
    9075             : 
    9076             :       /* "View.MemoryView":471
    9077             :  * 
    9078             :  *         try:
    9079             :  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
    9080             :  *                 (<PyObject **> item)[0] = <PyObject *> value
    9081             :  *             else:
    9082             :  */
    9083           0 :       goto __pyx_L8;
    9084             :     }
    9085             : 
    9086             :     /* "View.MemoryView":474
    9087             :  *                 (<PyObject **> item)[0] = <PyObject *> value
    9088             :  *             else:
    9089             :  *                 self.assign_item_from_object(<char *> item, value)             # <<<<<<<<<<<<<<
    9090             :  * 
    9091             :  * 
    9092             :  */
    9093             :     /*else*/ {
    9094           0 :       __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 474, __pyx_L6_error)
    9095           0 :       __Pyx_GOTREF(__pyx_t_3);
    9096           0 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    9097             :     }
    9098           0 :     __pyx_L8:;
    9099             : 
    9100             :     /* "View.MemoryView":478
    9101             :  * 
    9102             :  * 
    9103             :  *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
    9104             :  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
    9105             :  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
    9106             :  */
    9107           0 :     __pyx_t_2 = (__pyx_v_self->view.suboffsets != NULL);
    9108           0 :     if (__pyx_t_2) {
    9109             : 
    9110             :       /* "View.MemoryView":479
    9111             :  * 
    9112             :  *             if self.view.suboffsets != NULL:
    9113             :  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)             # <<<<<<<<<<<<<<
    9114             :  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
    9115             :  *                                 item, self.dtype_is_object)
    9116             :  */
    9117           0 :       __pyx_t_4 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 479, __pyx_L6_error)
    9118             : 
    9119             :       /* "View.MemoryView":478
    9120             :  * 
    9121             :  * 
    9122             :  *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
    9123             :  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
    9124             :  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
    9125             :  */
    9126             :     }
    9127             : 
    9128             :     /* "View.MemoryView":480
    9129             :  *             if self.view.suboffsets != NULL:
    9130             :  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
    9131             :  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,             # <<<<<<<<<<<<<<
    9132             :  *                                 item, self.dtype_is_object)
    9133             :  *         finally:
    9134             :  */
    9135           0 :     __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
    9136             :   }
    9137             : 
    9138             :   /* "View.MemoryView":483
    9139             :  *                                 item, self.dtype_is_object)
    9140             :  *         finally:
    9141             :  *             PyMem_Free(tmp)             # <<<<<<<<<<<<<<
    9142             :  * 
    9143             :  *     cdef setitem_indexed(self, index, value):
    9144             :  */
    9145             :   /*finally:*/ {
    9146             :     /*normal exit:*/{
    9147           0 :       PyMem_Free(__pyx_v_tmp);
    9148           0 :       goto __pyx_L7;
    9149             :     }
    9150           0 :     __pyx_L6_error:;
    9151             :     /*exception exit:*/{
    9152           0 :       __Pyx_PyThreadState_declare
    9153           0 :       __Pyx_PyThreadState_assign
    9154           0 :       __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
    9155           0 :       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    9156           0 :       if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
    9157           0 :       if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
    9158           0 :       __Pyx_XGOTREF(__pyx_t_7);
    9159           0 :       __Pyx_XGOTREF(__pyx_t_8);
    9160           0 :       __Pyx_XGOTREF(__pyx_t_9);
    9161           0 :       __Pyx_XGOTREF(__pyx_t_10);
    9162           0 :       __Pyx_XGOTREF(__pyx_t_11);
    9163           0 :       __Pyx_XGOTREF(__pyx_t_12);
    9164           0 :       __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
    9165             :       {
    9166           0 :         PyMem_Free(__pyx_v_tmp);
    9167             :       }
    9168           0 :       if (PY_MAJOR_VERSION >= 3) {
    9169           0 :         __Pyx_XGIVEREF(__pyx_t_10);
    9170           0 :         __Pyx_XGIVEREF(__pyx_t_11);
    9171           0 :         __Pyx_XGIVEREF(__pyx_t_12);
    9172           0 :         __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
    9173             :       }
    9174           0 :       __Pyx_XGIVEREF(__pyx_t_7);
    9175           0 :       __Pyx_XGIVEREF(__pyx_t_8);
    9176           0 :       __Pyx_XGIVEREF(__pyx_t_9);
    9177           0 :       __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    9178           0 :       __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
    9179           0 :       __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
    9180           0 :       goto __pyx_L1_error;
    9181             :     }
    9182           0 :     __pyx_L7:;
    9183             :   }
    9184             : 
    9185             :   /* "View.MemoryView":453
    9186             :  *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
    9187             :  * 
    9188             :  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
    9189             :  *         cdef int array[128]
    9190             :  *         cdef void *tmp = NULL
    9191             :  */
    9192             : 
    9193             :   /* function exit code */
    9194           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    9195           0 :   goto __pyx_L0;
    9196           0 :   __pyx_L1_error:;
    9197           0 :   __Pyx_XDECREF(__pyx_t_3);
    9198           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9199           0 :   __pyx_r = 0;
    9200           0 :   __pyx_L0:;
    9201           0 :   __Pyx_XGIVEREF(__pyx_r);
    9202           0 :   __Pyx_RefNannyFinishContext();
    9203           0 :   return __pyx_r;
    9204             : }
    9205             : 
    9206             : /* "View.MemoryView":485
    9207             :  *             PyMem_Free(tmp)
    9208             :  * 
    9209             :  *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
    9210             :  *         cdef char *itemp = self.get_item_pointer(index)
    9211             :  *         self.assign_item_from_object(itemp, value)
    9212             :  */
    9213             : 
    9214           0 : static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
    9215           0 :   char *__pyx_v_itemp;
    9216           0 :   PyObject *__pyx_r = NULL;
    9217             :   __Pyx_RefNannyDeclarations
    9218           0 :   char *__pyx_t_1;
    9219           0 :   PyObject *__pyx_t_2 = NULL;
    9220           0 :   int __pyx_lineno = 0;
    9221           0 :   const char *__pyx_filename = NULL;
    9222           0 :   int __pyx_clineno = 0;
    9223           0 :   __Pyx_RefNannySetupContext("setitem_indexed", 1);
    9224             : 
    9225             :   /* "View.MemoryView":486
    9226             :  * 
    9227             :  *     cdef setitem_indexed(self, index, value):
    9228             :  *         cdef char *itemp = self.get_item_pointer(index)             # <<<<<<<<<<<<<<
    9229             :  *         self.assign_item_from_object(itemp, value)
    9230             :  * 
    9231             :  */
    9232           0 :   __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(1, 486, __pyx_L1_error)
    9233           0 :   __pyx_v_itemp = __pyx_t_1;
    9234             : 
    9235             :   /* "View.MemoryView":487
    9236             :  *     cdef setitem_indexed(self, index, value):
    9237             :  *         cdef char *itemp = self.get_item_pointer(index)
    9238             :  *         self.assign_item_from_object(itemp, value)             # <<<<<<<<<<<<<<
    9239             :  * 
    9240             :  *     cdef convert_item_to_object(self, char *itemp):
    9241             :  */
    9242           0 :   __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 487, __pyx_L1_error)
    9243           0 :   __Pyx_GOTREF(__pyx_t_2);
    9244           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    9245             : 
    9246             :   /* "View.MemoryView":485
    9247             :  *             PyMem_Free(tmp)
    9248             :  * 
    9249             :  *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
    9250             :  *         cdef char *itemp = self.get_item_pointer(index)
    9251             :  *         self.assign_item_from_object(itemp, value)
    9252             :  */
    9253             : 
    9254             :   /* function exit code */
    9255           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    9256           0 :   goto __pyx_L0;
    9257           0 :   __pyx_L1_error:;
    9258           0 :   __Pyx_XDECREF(__pyx_t_2);
    9259           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9260           0 :   __pyx_r = 0;
    9261           0 :   __pyx_L0:;
    9262           0 :   __Pyx_XGIVEREF(__pyx_r);
    9263           0 :   __Pyx_RefNannyFinishContext();
    9264           0 :   return __pyx_r;
    9265             : }
    9266             : 
    9267             : /* "View.MemoryView":489
    9268             :  *         self.assign_item_from_object(itemp, value)
    9269             :  * 
    9270             :  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
    9271             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
    9272             :  *         know how to convert the type"""
    9273             :  */
    9274             : 
    9275           0 : static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
    9276           0 :   PyObject *__pyx_v_struct = NULL;
    9277           0 :   PyObject *__pyx_v_bytesitem = 0;
    9278           0 :   PyObject *__pyx_v_result = NULL;
    9279           0 :   PyObject *__pyx_r = NULL;
    9280             :   __Pyx_RefNannyDeclarations
    9281           0 :   PyObject *__pyx_t_1 = NULL;
    9282           0 :   PyObject *__pyx_t_2 = NULL;
    9283           0 :   PyObject *__pyx_t_3 = NULL;
    9284           0 :   PyObject *__pyx_t_4 = NULL;
    9285           0 :   PyObject *__pyx_t_5 = NULL;
    9286           0 :   PyObject *__pyx_t_6 = NULL;
    9287           0 :   PyObject *__pyx_t_7 = NULL;
    9288           0 :   unsigned int __pyx_t_8;
    9289           0 :   Py_ssize_t __pyx_t_9;
    9290           0 :   int __pyx_t_10;
    9291           0 :   int __pyx_t_11;
    9292           0 :   int __pyx_lineno = 0;
    9293           0 :   const char *__pyx_filename = NULL;
    9294           0 :   int __pyx_clineno = 0;
    9295           0 :   __Pyx_RefNannySetupContext("convert_item_to_object", 1);
    9296             : 
    9297             :   /* "View.MemoryView":492
    9298             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
    9299             :  *         know how to convert the type"""
    9300             :  *         import struct             # <<<<<<<<<<<<<<
    9301             :  *         cdef bytes bytesitem
    9302             :  * 
    9303             :  */
    9304           0 :   __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_struct, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 492, __pyx_L1_error)
    9305           0 :   __Pyx_GOTREF(__pyx_t_1);
    9306           0 :   __pyx_v_struct = __pyx_t_1;
    9307           0 :   __pyx_t_1 = 0;
    9308             : 
    9309             :   /* "View.MemoryView":495
    9310             :  *         cdef bytes bytesitem
    9311             :  * 
    9312             :  *         bytesitem = itemp[:self.view.itemsize]             # <<<<<<<<<<<<<<
    9313             :  *         try:
    9314             :  *             result = struct.unpack(self.view.format, bytesitem)
    9315             :  */
    9316           0 :   __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L1_error)
    9317           0 :   __Pyx_GOTREF(__pyx_t_1);
    9318           0 :   __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
    9319           0 :   __pyx_t_1 = 0;
    9320             : 
    9321             :   /* "View.MemoryView":496
    9322             :  * 
    9323             :  *         bytesitem = itemp[:self.view.itemsize]
    9324             :  *         try:             # <<<<<<<<<<<<<<
    9325             :  *             result = struct.unpack(self.view.format, bytesitem)
    9326             :  *         except struct.error:
    9327             :  */
    9328             :   {
    9329           0 :     __Pyx_PyThreadState_declare
    9330           0 :     __Pyx_PyThreadState_assign
    9331           0 :     __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    9332           0 :     __Pyx_XGOTREF(__pyx_t_2);
    9333           0 :     __Pyx_XGOTREF(__pyx_t_3);
    9334           0 :     __Pyx_XGOTREF(__pyx_t_4);
    9335             :     /*try:*/ {
    9336             : 
    9337             :       /* "View.MemoryView":497
    9338             :  *         bytesitem = itemp[:self.view.itemsize]
    9339             :  *         try:
    9340             :  *             result = struct.unpack(self.view.format, bytesitem)             # <<<<<<<<<<<<<<
    9341             :  *         except struct.error:
    9342             :  *             raise ValueError, "Unable to convert item to object"
    9343             :  */
    9344           0 :       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 497, __pyx_L3_error)
    9345           0 :       __Pyx_GOTREF(__pyx_t_5);
    9346           0 :       __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 497, __pyx_L3_error)
    9347           0 :       __Pyx_GOTREF(__pyx_t_6);
    9348           0 :       __pyx_t_7 = NULL;
    9349           0 :       __pyx_t_8 = 0;
    9350             :       #if CYTHON_UNPACK_METHODS
    9351           0 :       if (likely(PyMethod_Check(__pyx_t_5))) {
    9352           0 :         __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    9353           0 :         if (likely(__pyx_t_7)) {
    9354           0 :           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
    9355           0 :           __Pyx_INCREF(__pyx_t_7);
    9356           0 :           __Pyx_INCREF(function);
    9357           0 :           __Pyx_DECREF_SET(__pyx_t_5, function);
    9358             :           __pyx_t_8 = 1;
    9359             :         }
    9360             :       }
    9361             :       #endif
    9362             :       {
    9363           0 :         PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
    9364           0 :         __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8);
    9365           0 :         __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    9366           0 :         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    9367           0 :         if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 497, __pyx_L3_error)
    9368           0 :         __Pyx_GOTREF(__pyx_t_1);
    9369           0 :         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    9370             :       }
    9371           0 :       __pyx_v_result = __pyx_t_1;
    9372           0 :       __pyx_t_1 = 0;
    9373             : 
    9374             :       /* "View.MemoryView":496
    9375             :  * 
    9376             :  *         bytesitem = itemp[:self.view.itemsize]
    9377             :  *         try:             # <<<<<<<<<<<<<<
    9378             :  *             result = struct.unpack(self.view.format, bytesitem)
    9379             :  *         except struct.error:
    9380             :  */
    9381             :     }
    9382             : 
    9383             :     /* "View.MemoryView":501
    9384             :  *             raise ValueError, "Unable to convert item to object"
    9385             :  *         else:
    9386             :  *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
    9387             :  *                 return result[0]
    9388             :  *             return result
    9389             :  */
    9390             :     /*else:*/ {
    9391           0 :       __pyx_t_9 = __Pyx_ssize_strlen(__pyx_v_self->view.format); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(1, 501, __pyx_L5_except_error)
    9392           0 :       __pyx_t_10 = (__pyx_t_9 == 1);
    9393           0 :       if (__pyx_t_10) {
    9394             : 
    9395             :         /* "View.MemoryView":502
    9396             :  *         else:
    9397             :  *             if len(self.view.format) == 1:
    9398             :  *                 return result[0]             # <<<<<<<<<<<<<<
    9399             :  *             return result
    9400             :  * 
    9401             :  */
    9402           0 :         __Pyx_XDECREF(__pyx_r);
    9403           0 :         __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 502, __pyx_L5_except_error)
    9404           0 :         __Pyx_GOTREF(__pyx_t_1);
    9405           0 :         __pyx_r = __pyx_t_1;
    9406           0 :         __pyx_t_1 = 0;
    9407           0 :         goto __pyx_L6_except_return;
    9408             : 
    9409             :         /* "View.MemoryView":501
    9410             :  *             raise ValueError, "Unable to convert item to object"
    9411             :  *         else:
    9412             :  *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
    9413             :  *                 return result[0]
    9414             :  *             return result
    9415             :  */
    9416             :       }
    9417             : 
    9418             :       /* "View.MemoryView":503
    9419             :  *             if len(self.view.format) == 1:
    9420             :  *                 return result[0]
    9421             :  *             return result             # <<<<<<<<<<<<<<
    9422             :  * 
    9423             :  *     cdef assign_item_from_object(self, char *itemp, object value):
    9424             :  */
    9425           0 :       __Pyx_XDECREF(__pyx_r);
    9426           0 :       __Pyx_INCREF(__pyx_v_result);
    9427           0 :       __pyx_r = __pyx_v_result;
    9428           0 :       goto __pyx_L6_except_return;
    9429             :     }
    9430           0 :     __pyx_L3_error:;
    9431           0 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    9432           0 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    9433           0 :     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    9434           0 :     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    9435             : 
    9436             :     /* "View.MemoryView":498
    9437             :  *         try:
    9438             :  *             result = struct.unpack(self.view.format, bytesitem)
    9439             :  *         except struct.error:             # <<<<<<<<<<<<<<
    9440             :  *             raise ValueError, "Unable to convert item to object"
    9441             :  *         else:
    9442             :  */
    9443           0 :     __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_6);
    9444           0 :     __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 498, __pyx_L5_except_error)
    9445           0 :     __Pyx_GOTREF(__pyx_t_7);
    9446           0 :     __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_7);
    9447           0 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    9448           0 :     __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_6);
    9449           0 :     __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
    9450           0 :     if (__pyx_t_11) {
    9451           0 :       __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9452           0 :       if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(1, 498, __pyx_L5_except_error)
    9453           0 :       __Pyx_XGOTREF(__pyx_t_6);
    9454           0 :       __Pyx_XGOTREF(__pyx_t_5);
    9455           0 :       __Pyx_XGOTREF(__pyx_t_1);
    9456             : 
    9457             :       /* "View.MemoryView":499
    9458             :  *             result = struct.unpack(self.view.format, bytesitem)
    9459             :  *         except struct.error:
    9460             :  *             raise ValueError, "Unable to convert item to object"             # <<<<<<<<<<<<<<
    9461             :  *         else:
    9462             :  *             if len(self.view.format) == 1:
    9463             :  */
    9464           0 :       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Unable_to_convert_item_to_object, 0, 0);
    9465           0 :       __PYX_ERR(1, 499, __pyx_L5_except_error)
    9466             :     }
    9467           0 :     goto __pyx_L5_except_error;
    9468             : 
    9469             :     /* "View.MemoryView":496
    9470             :  * 
    9471             :  *         bytesitem = itemp[:self.view.itemsize]
    9472             :  *         try:             # <<<<<<<<<<<<<<
    9473             :  *             result = struct.unpack(self.view.format, bytesitem)
    9474             :  *         except struct.error:
    9475             :  */
    9476           0 :     __pyx_L5_except_error:;
    9477           0 :     __Pyx_XGIVEREF(__pyx_t_2);
    9478           0 :     __Pyx_XGIVEREF(__pyx_t_3);
    9479           0 :     __Pyx_XGIVEREF(__pyx_t_4);
    9480           0 :     __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    9481           0 :     goto __pyx_L1_error;
    9482           0 :     __pyx_L6_except_return:;
    9483           0 :     __Pyx_XGIVEREF(__pyx_t_2);
    9484           0 :     __Pyx_XGIVEREF(__pyx_t_3);
    9485           0 :     __Pyx_XGIVEREF(__pyx_t_4);
    9486           0 :     __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    9487           0 :     goto __pyx_L0;
    9488             :   }
    9489             : 
    9490             :   /* "View.MemoryView":489
    9491             :  *         self.assign_item_from_object(itemp, value)
    9492             :  * 
    9493             :  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
    9494             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
    9495             :  *         know how to convert the type"""
    9496             :  */
    9497             : 
    9498             :   /* function exit code */
    9499           0 :   __pyx_L1_error:;
    9500           0 :   __Pyx_XDECREF(__pyx_t_1);
    9501           0 :   __Pyx_XDECREF(__pyx_t_5);
    9502           0 :   __Pyx_XDECREF(__pyx_t_6);
    9503           0 :   __Pyx_XDECREF(__pyx_t_7);
    9504           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9505           0 :   __pyx_r = 0;
    9506           0 :   __pyx_L0:;
    9507           0 :   __Pyx_XDECREF(__pyx_v_struct);
    9508           0 :   __Pyx_XDECREF(__pyx_v_bytesitem);
    9509           0 :   __Pyx_XDECREF(__pyx_v_result);
    9510           0 :   __Pyx_XGIVEREF(__pyx_r);
    9511           0 :   __Pyx_RefNannyFinishContext();
    9512           0 :   return __pyx_r;
    9513             : }
    9514             : 
    9515             : /* "View.MemoryView":505
    9516             :  *             return result
    9517             :  * 
    9518             :  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
    9519             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
    9520             :  *         know how to convert the type"""
    9521             :  */
    9522             : 
    9523           0 : static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
    9524           0 :   PyObject *__pyx_v_struct = NULL;
    9525           0 :   char __pyx_v_c;
    9526           0 :   PyObject *__pyx_v_bytesvalue = 0;
    9527           0 :   Py_ssize_t __pyx_v_i;
    9528           0 :   PyObject *__pyx_r = NULL;
    9529             :   __Pyx_RefNannyDeclarations
    9530           0 :   PyObject *__pyx_t_1 = NULL;
    9531           0 :   int __pyx_t_2;
    9532           0 :   PyObject *__pyx_t_3 = NULL;
    9533           0 :   PyObject *__pyx_t_4 = NULL;
    9534           0 :   PyObject *__pyx_t_5 = NULL;
    9535           0 :   unsigned int __pyx_t_6;
    9536           0 :   Py_ssize_t __pyx_t_7;
    9537           0 :   PyObject *__pyx_t_8 = NULL;
    9538           0 :   char *__pyx_t_9;
    9539           0 :   char *__pyx_t_10;
    9540           0 :   char *__pyx_t_11;
    9541           0 :   char *__pyx_t_12;
    9542           0 :   int __pyx_lineno = 0;
    9543           0 :   const char *__pyx_filename = NULL;
    9544           0 :   int __pyx_clineno = 0;
    9545           0 :   __Pyx_RefNannySetupContext("assign_item_from_object", 1);
    9546             : 
    9547             :   /* "View.MemoryView":508
    9548             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
    9549             :  *         know how to convert the type"""
    9550             :  *         import struct             # <<<<<<<<<<<<<<
    9551             :  *         cdef char c
    9552             :  *         cdef bytes bytesvalue
    9553             :  */
    9554           0 :   __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_struct, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error)
    9555           0 :   __Pyx_GOTREF(__pyx_t_1);
    9556           0 :   __pyx_v_struct = __pyx_t_1;
    9557           0 :   __pyx_t_1 = 0;
    9558             : 
    9559             :   /* "View.MemoryView":513
    9560             :  *         cdef Py_ssize_t i
    9561             :  * 
    9562             :  *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
    9563             :  *             bytesvalue = struct.pack(self.view.format, *value)
    9564             :  *         else:
    9565             :  */
    9566           0 :   __pyx_t_2 = PyTuple_Check(__pyx_v_value); 
    9567           0 :   if (__pyx_t_2) {
    9568             : 
    9569             :     /* "View.MemoryView":514
    9570             :  * 
    9571             :  *         if isinstance(value, tuple):
    9572             :  *             bytesvalue = struct.pack(self.view.format, *value)             # <<<<<<<<<<<<<<
    9573             :  *         else:
    9574             :  *             bytesvalue = struct.pack(self.view.format, value)
    9575             :  */
    9576           0 :     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 514, __pyx_L1_error)
    9577           0 :     __Pyx_GOTREF(__pyx_t_1);
    9578           0 :     __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
    9579           0 :     __Pyx_GOTREF(__pyx_t_3);
    9580           0 :     __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 514, __pyx_L1_error)
    9581           0 :     __Pyx_GOTREF(__pyx_t_4);
    9582           0 :     __Pyx_GIVEREF(__pyx_t_3);
    9583           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error);
    9584           0 :     __pyx_t_3 = 0;
    9585           0 :     __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
    9586           0 :     __Pyx_GOTREF(__pyx_t_3);
    9587           0 :     __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 514, __pyx_L1_error)
    9588           0 :     __Pyx_GOTREF(__pyx_t_5);
    9589           0 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    9590           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    9591           0 :     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
    9592           0 :     __Pyx_GOTREF(__pyx_t_3);
    9593           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    9594           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    9595           0 :     if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(1, 514, __pyx_L1_error)
    9596           0 :     __pyx_v_bytesvalue = ((PyObject*)__pyx_t_3);
    9597           0 :     __pyx_t_3 = 0;
    9598             : 
    9599             :     /* "View.MemoryView":513
    9600             :  *         cdef Py_ssize_t i
    9601             :  * 
    9602             :  *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
    9603             :  *             bytesvalue = struct.pack(self.view.format, *value)
    9604             :  *         else:
    9605             :  */
    9606           0 :     goto __pyx_L3;
    9607             :   }
    9608             : 
    9609             :   /* "View.MemoryView":516
    9610             :  *             bytesvalue = struct.pack(self.view.format, *value)
    9611             :  *         else:
    9612             :  *             bytesvalue = struct.pack(self.view.format, value)             # <<<<<<<<<<<<<<
    9613             :  * 
    9614             :  *         for i, c in enumerate(bytesvalue):
    9615             :  */
    9616             :   /*else*/ {
    9617           0 :     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 516, __pyx_L1_error)
    9618           0 :     __Pyx_GOTREF(__pyx_t_5);
    9619           0 :     __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error)
    9620           0 :     __Pyx_GOTREF(__pyx_t_1);
    9621           0 :     __pyx_t_4 = NULL;
    9622           0 :     __pyx_t_6 = 0;
    9623             :     #if CYTHON_UNPACK_METHODS
    9624           0 :     if (likely(PyMethod_Check(__pyx_t_5))) {
    9625           0 :       __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    9626           0 :       if (likely(__pyx_t_4)) {
    9627           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
    9628           0 :         __Pyx_INCREF(__pyx_t_4);
    9629           0 :         __Pyx_INCREF(function);
    9630           0 :         __Pyx_DECREF_SET(__pyx_t_5, function);
    9631             :         __pyx_t_6 = 1;
    9632             :       }
    9633             :     }
    9634             :     #endif
    9635             :     {
    9636           0 :       PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_1, __pyx_v_value};
    9637           0 :       __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
    9638           0 :       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    9639           0 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    9640           0 :       if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 516, __pyx_L1_error)
    9641           0 :       __Pyx_GOTREF(__pyx_t_3);
    9642           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    9643             :     }
    9644           0 :     if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(1, 516, __pyx_L1_error)
    9645             :     __pyx_v_bytesvalue = ((PyObject*)__pyx_t_3);
    9646             :     __pyx_t_3 = 0;
    9647             :   }
    9648           0 :   __pyx_L3:;
    9649             : 
    9650             :   /* "View.MemoryView":518
    9651             :  *             bytesvalue = struct.pack(self.view.format, value)
    9652             :  * 
    9653             :  *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
    9654             :  *             itemp[i] = c
    9655             :  * 
    9656             :  */
    9657           0 :   __pyx_t_7 = 0;
    9658           0 :   if (unlikely(__pyx_v_bytesvalue == Py_None)) {
    9659           0 :     PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
    9660           0 :     __PYX_ERR(1, 518, __pyx_L1_error)
    9661             :   }
    9662           0 :   __Pyx_INCREF(__pyx_v_bytesvalue);
    9663           0 :   __pyx_t_8 = __pyx_v_bytesvalue;
    9664           0 :   __pyx_t_10 = PyBytes_AS_STRING(__pyx_t_8);
    9665           0 :   __pyx_t_11 = (__pyx_t_10 + PyBytes_GET_SIZE(__pyx_t_8));
    9666           0 :   for (__pyx_t_12 = __pyx_t_10; __pyx_t_12 < __pyx_t_11; __pyx_t_12++) {
    9667           0 :     __pyx_t_9 = __pyx_t_12;
    9668           0 :     __pyx_v_c = (__pyx_t_9[0]);
    9669             : 
    9670             :     /* "View.MemoryView":519
    9671             :  * 
    9672             :  *         for i, c in enumerate(bytesvalue):
    9673             :  *             itemp[i] = c             # <<<<<<<<<<<<<<
    9674             :  * 
    9675             :  *     @cname('getbuffer')
    9676             :  */
    9677           0 :     __pyx_v_i = __pyx_t_7;
    9678             : 
    9679             :     /* "View.MemoryView":518
    9680             :  *             bytesvalue = struct.pack(self.view.format, value)
    9681             :  * 
    9682             :  *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
    9683             :  *             itemp[i] = c
    9684             :  * 
    9685             :  */
    9686           0 :     __pyx_t_7 = (__pyx_t_7 + 1);
    9687             : 
    9688             :     /* "View.MemoryView":519
    9689             :  * 
    9690             :  *         for i, c in enumerate(bytesvalue):
    9691             :  *             itemp[i] = c             # <<<<<<<<<<<<<<
    9692             :  * 
    9693             :  *     @cname('getbuffer')
    9694             :  */
    9695           0 :     (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
    9696             :   }
    9697           0 :   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    9698             : 
    9699             :   /* "View.MemoryView":505
    9700             :  *             return result
    9701             :  * 
    9702             :  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
    9703             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
    9704             :  *         know how to convert the type"""
    9705             :  */
    9706             : 
    9707             :   /* function exit code */
    9708           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    9709           0 :   goto __pyx_L0;
    9710           0 :   __pyx_L1_error:;
    9711           0 :   __Pyx_XDECREF(__pyx_t_1);
    9712           0 :   __Pyx_XDECREF(__pyx_t_3);
    9713           0 :   __Pyx_XDECREF(__pyx_t_4);
    9714           0 :   __Pyx_XDECREF(__pyx_t_5);
    9715           0 :   __Pyx_XDECREF(__pyx_t_8);
    9716           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9717           0 :   __pyx_r = 0;
    9718           0 :   __pyx_L0:;
    9719           0 :   __Pyx_XDECREF(__pyx_v_struct);
    9720           0 :   __Pyx_XDECREF(__pyx_v_bytesvalue);
    9721           0 :   __Pyx_XGIVEREF(__pyx_r);
    9722           0 :   __Pyx_RefNannyFinishContext();
    9723           0 :   return __pyx_r;
    9724             : }
    9725             : 
    9726             : /* "View.MemoryView":521
    9727             :  *             itemp[i] = c
    9728             :  * 
    9729             :  *     @cname('getbuffer')             # <<<<<<<<<<<<<<
    9730             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    9731             :  *         if flags & PyBUF_WRITABLE and self.view.readonly:
    9732             :  */
    9733             : 
    9734             : /* Python wrapper */
    9735             : CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
    9736         203 : CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
    9737         203 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    9738         203 :   int __pyx_r;
    9739             :   __Pyx_RefNannyDeclarations
    9740         203 :   __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
    9741         203 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    9742         203 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
    9743             : 
    9744             :   /* function exit code */
    9745         203 :   __Pyx_RefNannyFinishContext();
    9746         203 :   return __pyx_r;
    9747             : }
    9748             : 
    9749         203 : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
    9750         203 :   int __pyx_r;
    9751             :   __Pyx_RefNannyDeclarations
    9752         203 :   int __pyx_t_1;
    9753         203 :   int __pyx_t_2;
    9754         203 :   Py_ssize_t *__pyx_t_3;
    9755         203 :   char *__pyx_t_4;
    9756         203 :   void *__pyx_t_5;
    9757         203 :   int __pyx_t_6;
    9758         203 :   Py_ssize_t __pyx_t_7;
    9759         203 :   int __pyx_lineno = 0;
    9760         203 :   const char *__pyx_filename = NULL;
    9761         203 :   int __pyx_clineno = 0;
    9762         203 :   if (unlikely(__pyx_v_info == NULL)) {
    9763           0 :     PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    9764           0 :     return -1;
    9765             :   }
    9766         203 :   __Pyx_RefNannySetupContext("__getbuffer__", 0);
    9767         203 :   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
    9768         203 :   __Pyx_GIVEREF(__pyx_v_info->obj);
    9769             : 
    9770             :   /* "View.MemoryView":523
    9771             :  *     @cname('getbuffer')
    9772             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    9773             :  *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
    9774             :  *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
    9775             :  * 
    9776             :  */
    9777         203 :   __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
    9778         203 :   if (__pyx_t_2) {
    9779           0 :   } else {
    9780         203 :     __pyx_t_1 = __pyx_t_2;
    9781         203 :     goto __pyx_L4_bool_binop_done;
    9782             :   }
    9783           0 :   __pyx_t_1 = __pyx_v_self->view.readonly;
    9784         203 :   __pyx_L4_bool_binop_done:;
    9785         203 :   if (unlikely(__pyx_t_1)) {
    9786             : 
    9787             :     /* "View.MemoryView":524
    9788             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    9789             :  *         if flags & PyBUF_WRITABLE and self.view.readonly:
    9790             :  *             raise ValueError, "Cannot create writable memory view from read-only memoryview"             # <<<<<<<<<<<<<<
    9791             :  * 
    9792             :  *         if flags & PyBUF_ND:
    9793             :  */
    9794           0 :     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Cannot_create_writable_memory_vi, 0, 0);
    9795           0 :     __PYX_ERR(1, 524, __pyx_L1_error)
    9796             : 
    9797             :     /* "View.MemoryView":523
    9798             :  *     @cname('getbuffer')
    9799             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    9800             :  *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
    9801             :  *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
    9802             :  * 
    9803             :  */
    9804             :   }
    9805             : 
    9806             :   /* "View.MemoryView":526
    9807             :  *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
    9808             :  * 
    9809             :  *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
    9810             :  *             info.shape = self.view.shape
    9811             :  *         else:
    9812             :  */
    9813         203 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
    9814         203 :   if (__pyx_t_1) {
    9815             : 
    9816             :     /* "View.MemoryView":527
    9817             :  * 
    9818             :  *         if flags & PyBUF_ND:
    9819             :  *             info.shape = self.view.shape             # <<<<<<<<<<<<<<
    9820             :  *         else:
    9821             :  *             info.shape = NULL
    9822             :  */
    9823         203 :     __pyx_t_3 = __pyx_v_self->view.shape;
    9824         203 :     __pyx_v_info->shape = __pyx_t_3;
    9825             : 
    9826             :     /* "View.MemoryView":526
    9827             :  *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
    9828             :  * 
    9829             :  *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
    9830             :  *             info.shape = self.view.shape
    9831             :  *         else:
    9832             :  */
    9833         203 :     goto __pyx_L6;
    9834             :   }
    9835             : 
    9836             :   /* "View.MemoryView":529
    9837             :  *             info.shape = self.view.shape
    9838             :  *         else:
    9839             :  *             info.shape = NULL             # <<<<<<<<<<<<<<
    9840             :  * 
    9841             :  *         if flags & PyBUF_STRIDES:
    9842             :  */
    9843             :   /*else*/ {
    9844           0 :     __pyx_v_info->shape = NULL;
    9845             :   }
    9846         203 :   __pyx_L6:;
    9847             : 
    9848             :   /* "View.MemoryView":531
    9849             :  *             info.shape = NULL
    9850             :  * 
    9851             :  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
    9852             :  *             info.strides = self.view.strides
    9853             :  *         else:
    9854             :  */
    9855         203 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
    9856         203 :   if (__pyx_t_1) {
    9857             : 
    9858             :     /* "View.MemoryView":532
    9859             :  * 
    9860             :  *         if flags & PyBUF_STRIDES:
    9861             :  *             info.strides = self.view.strides             # <<<<<<<<<<<<<<
    9862             :  *         else:
    9863             :  *             info.strides = NULL
    9864             :  */
    9865         203 :     __pyx_t_3 = __pyx_v_self->view.strides;
    9866         203 :     __pyx_v_info->strides = __pyx_t_3;
    9867             : 
    9868             :     /* "View.MemoryView":531
    9869             :  *             info.shape = NULL
    9870             :  * 
    9871             :  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
    9872             :  *             info.strides = self.view.strides
    9873             :  *         else:
    9874             :  */
    9875         203 :     goto __pyx_L7;
    9876             :   }
    9877             : 
    9878             :   /* "View.MemoryView":534
    9879             :  *             info.strides = self.view.strides
    9880             :  *         else:
    9881             :  *             info.strides = NULL             # <<<<<<<<<<<<<<
    9882             :  * 
    9883             :  *         if flags & PyBUF_INDIRECT:
    9884             :  */
    9885             :   /*else*/ {
    9886           0 :     __pyx_v_info->strides = NULL;
    9887             :   }
    9888         203 :   __pyx_L7:;
    9889             : 
    9890             :   /* "View.MemoryView":536
    9891             :  *             info.strides = NULL
    9892             :  * 
    9893             :  *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
    9894             :  *             info.suboffsets = self.view.suboffsets
    9895             :  *         else:
    9896             :  */
    9897         203 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
    9898         203 :   if (__pyx_t_1) {
    9899             : 
    9900             :     /* "View.MemoryView":537
    9901             :  * 
    9902             :  *         if flags & PyBUF_INDIRECT:
    9903             :  *             info.suboffsets = self.view.suboffsets             # <<<<<<<<<<<<<<
    9904             :  *         else:
    9905             :  *             info.suboffsets = NULL
    9906             :  */
    9907         203 :     __pyx_t_3 = __pyx_v_self->view.suboffsets;
    9908         203 :     __pyx_v_info->suboffsets = __pyx_t_3;
    9909             : 
    9910             :     /* "View.MemoryView":536
    9911             :  *             info.strides = NULL
    9912             :  * 
    9913             :  *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
    9914             :  *             info.suboffsets = self.view.suboffsets
    9915             :  *         else:
    9916             :  */
    9917         203 :     goto __pyx_L8;
    9918             :   }
    9919             : 
    9920             :   /* "View.MemoryView":539
    9921             :  *             info.suboffsets = self.view.suboffsets
    9922             :  *         else:
    9923             :  *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
    9924             :  * 
    9925             :  *         if flags & PyBUF_FORMAT:
    9926             :  */
    9927             :   /*else*/ {
    9928           0 :     __pyx_v_info->suboffsets = NULL;
    9929             :   }
    9930         203 :   __pyx_L8:;
    9931             : 
    9932             :   /* "View.MemoryView":541
    9933             :  *             info.suboffsets = NULL
    9934             :  * 
    9935             :  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
    9936             :  *             info.format = self.view.format
    9937             :  *         else:
    9938             :  */
    9939         203 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
    9940         203 :   if (__pyx_t_1) {
    9941             : 
    9942             :     /* "View.MemoryView":542
    9943             :  * 
    9944             :  *         if flags & PyBUF_FORMAT:
    9945             :  *             info.format = self.view.format             # <<<<<<<<<<<<<<
    9946             :  *         else:
    9947             :  *             info.format = NULL
    9948             :  */
    9949         203 :     __pyx_t_4 = __pyx_v_self->view.format;
    9950         203 :     __pyx_v_info->format = __pyx_t_4;
    9951             : 
    9952             :     /* "View.MemoryView":541
    9953             :  *             info.suboffsets = NULL
    9954             :  * 
    9955             :  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
    9956             :  *             info.format = self.view.format
    9957             :  *         else:
    9958             :  */
    9959         203 :     goto __pyx_L9;
    9960             :   }
    9961             : 
    9962             :   /* "View.MemoryView":544
    9963             :  *             info.format = self.view.format
    9964             :  *         else:
    9965             :  *             info.format = NULL             # <<<<<<<<<<<<<<
    9966             :  * 
    9967             :  *         info.buf = self.view.buf
    9968             :  */
    9969             :   /*else*/ {
    9970           0 :     __pyx_v_info->format = NULL;
    9971             :   }
    9972         203 :   __pyx_L9:;
    9973             : 
    9974             :   /* "View.MemoryView":546
    9975             :  *             info.format = NULL
    9976             :  * 
    9977             :  *         info.buf = self.view.buf             # <<<<<<<<<<<<<<
    9978             :  *         info.ndim = self.view.ndim
    9979             :  *         info.itemsize = self.view.itemsize
    9980             :  */
    9981         203 :   __pyx_t_5 = __pyx_v_self->view.buf;
    9982         203 :   __pyx_v_info->buf = __pyx_t_5;
    9983             : 
    9984             :   /* "View.MemoryView":547
    9985             :  * 
    9986             :  *         info.buf = self.view.buf
    9987             :  *         info.ndim = self.view.ndim             # <<<<<<<<<<<<<<
    9988             :  *         info.itemsize = self.view.itemsize
    9989             :  *         info.len = self.view.len
    9990             :  */
    9991         203 :   __pyx_t_6 = __pyx_v_self->view.ndim;
    9992         203 :   __pyx_v_info->ndim = __pyx_t_6;
    9993             : 
    9994             :   /* "View.MemoryView":548
    9995             :  *         info.buf = self.view.buf
    9996             :  *         info.ndim = self.view.ndim
    9997             :  *         info.itemsize = self.view.itemsize             # <<<<<<<<<<<<<<
    9998             :  *         info.len = self.view.len
    9999             :  *         info.readonly = self.view.readonly
   10000             :  */
   10001         203 :   __pyx_t_7 = __pyx_v_self->view.itemsize;
   10002         203 :   __pyx_v_info->itemsize = __pyx_t_7;
   10003             : 
   10004             :   /* "View.MemoryView":549
   10005             :  *         info.ndim = self.view.ndim
   10006             :  *         info.itemsize = self.view.itemsize
   10007             :  *         info.len = self.view.len             # <<<<<<<<<<<<<<
   10008             :  *         info.readonly = self.view.readonly
   10009             :  *         info.obj = self
   10010             :  */
   10011         203 :   __pyx_t_7 = __pyx_v_self->view.len;
   10012         203 :   __pyx_v_info->len = __pyx_t_7;
   10013             : 
   10014             :   /* "View.MemoryView":550
   10015             :  *         info.itemsize = self.view.itemsize
   10016             :  *         info.len = self.view.len
   10017             :  *         info.readonly = self.view.readonly             # <<<<<<<<<<<<<<
   10018             :  *         info.obj = self
   10019             :  * 
   10020             :  */
   10021         203 :   __pyx_t_1 = __pyx_v_self->view.readonly;
   10022         203 :   __pyx_v_info->readonly = __pyx_t_1;
   10023             : 
   10024             :   /* "View.MemoryView":551
   10025             :  *         info.len = self.view.len
   10026             :  *         info.readonly = self.view.readonly
   10027             :  *         info.obj = self             # <<<<<<<<<<<<<<
   10028             :  * 
   10029             :  * 
   10030             :  */
   10031         203 :   __Pyx_INCREF((PyObject *)__pyx_v_self);
   10032         203 :   __Pyx_GIVEREF((PyObject *)__pyx_v_self);
   10033         203 :   __Pyx_GOTREF(__pyx_v_info->obj);
   10034         203 :   __Pyx_DECREF(__pyx_v_info->obj);
   10035         203 :   __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
   10036             : 
   10037             :   /* "View.MemoryView":521
   10038             :  *             itemp[i] = c
   10039             :  * 
   10040             :  *     @cname('getbuffer')             # <<<<<<<<<<<<<<
   10041             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
   10042             :  *         if flags & PyBUF_WRITABLE and self.view.readonly:
   10043             :  */
   10044             : 
   10045             :   /* function exit code */
   10046         203 :   __pyx_r = 0;
   10047         203 :   goto __pyx_L0;
   10048           0 :   __pyx_L1_error:;
   10049           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10050           0 :   __pyx_r = -1;
   10051           0 :   if (__pyx_v_info->obj != NULL) {
   10052           0 :     __Pyx_GOTREF(__pyx_v_info->obj);
   10053           0 :     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
   10054             :   }
   10055           0 :   goto __pyx_L2;
   10056         203 :   __pyx_L0:;
   10057         203 :   if (__pyx_v_info->obj == Py_None) {
   10058           0 :     __Pyx_GOTREF(__pyx_v_info->obj);
   10059           0 :     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
   10060             :   }
   10061         203 :   __pyx_L2:;
   10062             :   __Pyx_RefNannyFinishContext();
   10063             :   return __pyx_r;
   10064             : }
   10065             : 
   10066             : /* "View.MemoryView":554
   10067             :  * 
   10068             :  * 
   10069             :  *     @property             # <<<<<<<<<<<<<<
   10070             :  *     def T(self):
   10071             :  *         cdef _memoryviewslice result = memoryview_copy(self)
   10072             :  */
   10073             : 
   10074             : /* Python wrapper */
   10075             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
   10076           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
   10077           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10078           0 :   PyObject *__pyx_r = 0;
   10079             :   __Pyx_RefNannyDeclarations
   10080           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10081           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10082           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10083             : 
   10084             :   /* function exit code */
   10085           0 :   __Pyx_RefNannyFinishContext();
   10086           0 :   return __pyx_r;
   10087             : }
   10088             : 
   10089           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10090           0 :   struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
   10091           0 :   PyObject *__pyx_r = NULL;
   10092             :   __Pyx_RefNannyDeclarations
   10093           0 :   PyObject *__pyx_t_1 = NULL;
   10094           0 :   int __pyx_t_2;
   10095           0 :   int __pyx_lineno = 0;
   10096           0 :   const char *__pyx_filename = NULL;
   10097           0 :   int __pyx_clineno = 0;
   10098           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10099             : 
   10100             :   /* "View.MemoryView":556
   10101             :  *     @property
   10102             :  *     def T(self):
   10103             :  *         cdef _memoryviewslice result = memoryview_copy(self)             # <<<<<<<<<<<<<<
   10104             :  *         transpose_memslice(&result.from_slice)
   10105             :  *         return result
   10106             :  */
   10107           0 :   __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 556, __pyx_L1_error)
   10108           0 :   __Pyx_GOTREF(__pyx_t_1);
   10109           0 :   if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(1, 556, __pyx_L1_error)
   10110           0 :   __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
   10111           0 :   __pyx_t_1 = 0;
   10112             : 
   10113             :   /* "View.MemoryView":557
   10114             :  *     def T(self):
   10115             :  *         cdef _memoryviewslice result = memoryview_copy(self)
   10116             :  *         transpose_memslice(&result.from_slice)             # <<<<<<<<<<<<<<
   10117             :  *         return result
   10118             :  * 
   10119             :  */
   10120           0 :   __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 557, __pyx_L1_error)
   10121             : 
   10122             :   /* "View.MemoryView":558
   10123             :  *         cdef _memoryviewslice result = memoryview_copy(self)
   10124             :  *         transpose_memslice(&result.from_slice)
   10125             :  *         return result             # <<<<<<<<<<<<<<
   10126             :  * 
   10127             :  *     @property
   10128             :  */
   10129           0 :   __Pyx_XDECREF(__pyx_r);
   10130           0 :   __Pyx_INCREF((PyObject *)__pyx_v_result);
   10131           0 :   __pyx_r = ((PyObject *)__pyx_v_result);
   10132           0 :   goto __pyx_L0;
   10133             : 
   10134             :   /* "View.MemoryView":554
   10135             :  * 
   10136             :  * 
   10137             :  *     @property             # <<<<<<<<<<<<<<
   10138             :  *     def T(self):
   10139             :  *         cdef _memoryviewslice result = memoryview_copy(self)
   10140             :  */
   10141             : 
   10142             :   /* function exit code */
   10143           0 :   __pyx_L1_error:;
   10144           0 :   __Pyx_XDECREF(__pyx_t_1);
   10145           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10146           0 :   __pyx_r = NULL;
   10147           0 :   __pyx_L0:;
   10148           0 :   __Pyx_XDECREF((PyObject *)__pyx_v_result);
   10149           0 :   __Pyx_XGIVEREF(__pyx_r);
   10150           0 :   __Pyx_RefNannyFinishContext();
   10151           0 :   return __pyx_r;
   10152             : }
   10153             : 
   10154             : /* "View.MemoryView":560
   10155             :  *         return result
   10156             :  * 
   10157             :  *     @property             # <<<<<<<<<<<<<<
   10158             :  *     def base(self):
   10159             :  *         return self._get_base()
   10160             :  */
   10161             : 
   10162             : /* Python wrapper */
   10163             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
   10164           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
   10165           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10166           0 :   PyObject *__pyx_r = 0;
   10167             :   __Pyx_RefNannyDeclarations
   10168           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10169           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10170           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10171             : 
   10172             :   /* function exit code */
   10173           0 :   __Pyx_RefNannyFinishContext();
   10174           0 :   return __pyx_r;
   10175             : }
   10176             : 
   10177           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10178           0 :   PyObject *__pyx_r = NULL;
   10179             :   __Pyx_RefNannyDeclarations
   10180           0 :   PyObject *__pyx_t_1 = NULL;
   10181           0 :   int __pyx_lineno = 0;
   10182           0 :   const char *__pyx_filename = NULL;
   10183           0 :   int __pyx_clineno = 0;
   10184           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10185             : 
   10186             :   /* "View.MemoryView":562
   10187             :  *     @property
   10188             :  *     def base(self):
   10189             :  *         return self._get_base()             # <<<<<<<<<<<<<<
   10190             :  * 
   10191             :  *     cdef _get_base(self):
   10192             :  */
   10193           0 :   __Pyx_XDECREF(__pyx_r);
   10194           0 :   __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->_get_base(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 562, __pyx_L1_error)
   10195           0 :   __Pyx_GOTREF(__pyx_t_1);
   10196           0 :   __pyx_r = __pyx_t_1;
   10197           0 :   __pyx_t_1 = 0;
   10198           0 :   goto __pyx_L0;
   10199             : 
   10200             :   /* "View.MemoryView":560
   10201             :  *         return result
   10202             :  * 
   10203             :  *     @property             # <<<<<<<<<<<<<<
   10204             :  *     def base(self):
   10205             :  *         return self._get_base()
   10206             :  */
   10207             : 
   10208             :   /* function exit code */
   10209           0 :   __pyx_L1_error:;
   10210           0 :   __Pyx_XDECREF(__pyx_t_1);
   10211           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10212           0 :   __pyx_r = NULL;
   10213           0 :   __pyx_L0:;
   10214           0 :   __Pyx_XGIVEREF(__pyx_r);
   10215           0 :   __Pyx_RefNannyFinishContext();
   10216           0 :   return __pyx_r;
   10217             : }
   10218             : 
   10219             : /* "View.MemoryView":564
   10220             :  *         return self._get_base()
   10221             :  * 
   10222             :  *     cdef _get_base(self):             # <<<<<<<<<<<<<<
   10223             :  *         return self.obj
   10224             :  * 
   10225             :  */
   10226             : 
   10227         338 : static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self) {
   10228         338 :   PyObject *__pyx_r = NULL;
   10229             :   __Pyx_RefNannyDeclarations
   10230         338 :   __Pyx_RefNannySetupContext("_get_base", 1);
   10231             : 
   10232             :   /* "View.MemoryView":565
   10233             :  * 
   10234             :  *     cdef _get_base(self):
   10235             :  *         return self.obj             # <<<<<<<<<<<<<<
   10236             :  * 
   10237             :  *     @property
   10238             :  */
   10239         338 :   __Pyx_XDECREF(__pyx_r);
   10240         338 :   __Pyx_INCREF(__pyx_v_self->obj);
   10241         338 :   __pyx_r = __pyx_v_self->obj;
   10242         338 :   goto __pyx_L0;
   10243             : 
   10244             :   /* "View.MemoryView":564
   10245             :  *         return self._get_base()
   10246             :  * 
   10247             :  *     cdef _get_base(self):             # <<<<<<<<<<<<<<
   10248             :  *         return self.obj
   10249             :  * 
   10250             :  */
   10251             : 
   10252             :   /* function exit code */
   10253         338 :   __pyx_L0:;
   10254         338 :   __Pyx_XGIVEREF(__pyx_r);
   10255         338 :   __Pyx_RefNannyFinishContext();
   10256         338 :   return __pyx_r;
   10257             : }
   10258             : 
   10259             : /* "View.MemoryView":567
   10260             :  *         return self.obj
   10261             :  * 
   10262             :  *     @property             # <<<<<<<<<<<<<<
   10263             :  *     def shape(self):
   10264             :  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
   10265             :  */
   10266             : 
   10267             : /* Python wrapper */
   10268             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
   10269           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
   10270           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10271           0 :   PyObject *__pyx_r = 0;
   10272             :   __Pyx_RefNannyDeclarations
   10273           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10274           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10275           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10276             : 
   10277             :   /* function exit code */
   10278           0 :   __Pyx_RefNannyFinishContext();
   10279           0 :   return __pyx_r;
   10280             : }
   10281             : 
   10282           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10283           0 :   Py_ssize_t __pyx_7genexpr__pyx_v_length;
   10284           0 :   PyObject *__pyx_r = NULL;
   10285             :   __Pyx_RefNannyDeclarations
   10286           0 :   PyObject *__pyx_t_1 = NULL;
   10287           0 :   Py_ssize_t *__pyx_t_2;
   10288           0 :   Py_ssize_t *__pyx_t_3;
   10289           0 :   Py_ssize_t *__pyx_t_4;
   10290           0 :   PyObject *__pyx_t_5 = NULL;
   10291           0 :   int __pyx_lineno = 0;
   10292           0 :   const char *__pyx_filename = NULL;
   10293           0 :   int __pyx_clineno = 0;
   10294           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10295             : 
   10296             :   /* "View.MemoryView":569
   10297             :  *     @property
   10298             :  *     def shape(self):
   10299             :  *         return tuple([length for length in self.view.shape[:self.view.ndim]])             # <<<<<<<<<<<<<<
   10300             :  * 
   10301             :  *     @property
   10302             :  */
   10303           0 :   __Pyx_XDECREF(__pyx_r);
   10304             :   { /* enter inner scope */
   10305           0 :     __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 569, __pyx_L1_error)
   10306           0 :     __Pyx_GOTREF(__pyx_t_1);
   10307           0 :     __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
   10308           0 :     for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
   10309           0 :       __pyx_t_2 = __pyx_t_4;
   10310           0 :       __pyx_7genexpr__pyx_v_length = (__pyx_t_2[0]);
   10311           0 :       __pyx_t_5 = PyInt_FromSsize_t(__pyx_7genexpr__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 569, __pyx_L1_error)
   10312           0 :       __Pyx_GOTREF(__pyx_t_5);
   10313           0 :       if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 569, __pyx_L1_error)
   10314           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   10315             :     }
   10316             :   } /* exit inner scope */
   10317           0 :   __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 569, __pyx_L1_error)
   10318           0 :   __Pyx_GOTREF(__pyx_t_5);
   10319           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   10320           0 :   __pyx_r = __pyx_t_5;
   10321           0 :   __pyx_t_5 = 0;
   10322           0 :   goto __pyx_L0;
   10323             : 
   10324             :   /* "View.MemoryView":567
   10325             :  *         return self.obj
   10326             :  * 
   10327             :  *     @property             # <<<<<<<<<<<<<<
   10328             :  *     def shape(self):
   10329             :  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
   10330             :  */
   10331             : 
   10332             :   /* function exit code */
   10333           0 :   __pyx_L1_error:;
   10334           0 :   __Pyx_XDECREF(__pyx_t_1);
   10335           0 :   __Pyx_XDECREF(__pyx_t_5);
   10336           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10337           0 :   __pyx_r = NULL;
   10338           0 :   __pyx_L0:;
   10339           0 :   __Pyx_XGIVEREF(__pyx_r);
   10340           0 :   __Pyx_RefNannyFinishContext();
   10341           0 :   return __pyx_r;
   10342             : }
   10343             : 
   10344             : /* "View.MemoryView":571
   10345             :  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
   10346             :  * 
   10347             :  *     @property             # <<<<<<<<<<<<<<
   10348             :  *     def strides(self):
   10349             :  *         if self.view.strides == NULL:
   10350             :  */
   10351             : 
   10352             : /* Python wrapper */
   10353             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
   10354           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
   10355           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10356           0 :   PyObject *__pyx_r = 0;
   10357             :   __Pyx_RefNannyDeclarations
   10358           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10359           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10360           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10361             : 
   10362             :   /* function exit code */
   10363           0 :   __Pyx_RefNannyFinishContext();
   10364           0 :   return __pyx_r;
   10365             : }
   10366             : 
   10367           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10368           0 :   Py_ssize_t __pyx_8genexpr1__pyx_v_stride;
   10369           0 :   PyObject *__pyx_r = NULL;
   10370             :   __Pyx_RefNannyDeclarations
   10371           0 :   int __pyx_t_1;
   10372           0 :   PyObject *__pyx_t_2 = NULL;
   10373           0 :   Py_ssize_t *__pyx_t_3;
   10374           0 :   Py_ssize_t *__pyx_t_4;
   10375           0 :   Py_ssize_t *__pyx_t_5;
   10376           0 :   PyObject *__pyx_t_6 = NULL;
   10377           0 :   int __pyx_lineno = 0;
   10378           0 :   const char *__pyx_filename = NULL;
   10379           0 :   int __pyx_clineno = 0;
   10380           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10381             : 
   10382             :   /* "View.MemoryView":573
   10383             :  *     @property
   10384             :  *     def strides(self):
   10385             :  *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
   10386             :  * 
   10387             :  *             raise ValueError, "Buffer view does not expose strides"
   10388             :  */
   10389           0 :   __pyx_t_1 = (__pyx_v_self->view.strides == NULL);
   10390           0 :   if (unlikely(__pyx_t_1)) {
   10391             : 
   10392             :     /* "View.MemoryView":575
   10393             :  *         if self.view.strides == NULL:
   10394             :  * 
   10395             :  *             raise ValueError, "Buffer view does not expose strides"             # <<<<<<<<<<<<<<
   10396             :  * 
   10397             :  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
   10398             :  */
   10399           0 :     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Buffer_view_does_not_expose_stri, 0, 0);
   10400           0 :     __PYX_ERR(1, 575, __pyx_L1_error)
   10401             : 
   10402             :     /* "View.MemoryView":573
   10403             :  *     @property
   10404             :  *     def strides(self):
   10405             :  *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
   10406             :  * 
   10407             :  *             raise ValueError, "Buffer view does not expose strides"
   10408             :  */
   10409             :   }
   10410             : 
   10411             :   /* "View.MemoryView":577
   10412             :  *             raise ValueError, "Buffer view does not expose strides"
   10413             :  * 
   10414             :  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])             # <<<<<<<<<<<<<<
   10415             :  * 
   10416             :  *     @property
   10417             :  */
   10418           0 :   __Pyx_XDECREF(__pyx_r);
   10419             :   { /* enter inner scope */
   10420           0 :     __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 577, __pyx_L1_error)
   10421           0 :     __Pyx_GOTREF(__pyx_t_2);
   10422           0 :     __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
   10423           0 :     for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
   10424           0 :       __pyx_t_3 = __pyx_t_5;
   10425           0 :       __pyx_8genexpr1__pyx_v_stride = (__pyx_t_3[0]);
   10426           0 :       __pyx_t_6 = PyInt_FromSsize_t(__pyx_8genexpr1__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 577, __pyx_L1_error)
   10427           0 :       __Pyx_GOTREF(__pyx_t_6);
   10428           0 :       if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 577, __pyx_L1_error)
   10429           0 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   10430             :     }
   10431             :   } /* exit inner scope */
   10432           0 :   __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 577, __pyx_L1_error)
   10433           0 :   __Pyx_GOTREF(__pyx_t_6);
   10434           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   10435           0 :   __pyx_r = __pyx_t_6;
   10436           0 :   __pyx_t_6 = 0;
   10437           0 :   goto __pyx_L0;
   10438             : 
   10439             :   /* "View.MemoryView":571
   10440             :  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
   10441             :  * 
   10442             :  *     @property             # <<<<<<<<<<<<<<
   10443             :  *     def strides(self):
   10444             :  *         if self.view.strides == NULL:
   10445             :  */
   10446             : 
   10447             :   /* function exit code */
   10448           0 :   __pyx_L1_error:;
   10449           0 :   __Pyx_XDECREF(__pyx_t_2);
   10450           0 :   __Pyx_XDECREF(__pyx_t_6);
   10451           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10452           0 :   __pyx_r = NULL;
   10453           0 :   __pyx_L0:;
   10454           0 :   __Pyx_XGIVEREF(__pyx_r);
   10455           0 :   __Pyx_RefNannyFinishContext();
   10456           0 :   return __pyx_r;
   10457             : }
   10458             : 
   10459             : /* "View.MemoryView":579
   10460             :  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
   10461             :  * 
   10462             :  *     @property             # <<<<<<<<<<<<<<
   10463             :  *     def suboffsets(self):
   10464             :  *         if self.view.suboffsets == NULL:
   10465             :  */
   10466             : 
   10467             : /* Python wrapper */
   10468             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
   10469           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
   10470           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10471           0 :   PyObject *__pyx_r = 0;
   10472             :   __Pyx_RefNannyDeclarations
   10473           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10474           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10475           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10476             : 
   10477             :   /* function exit code */
   10478           0 :   __Pyx_RefNannyFinishContext();
   10479           0 :   return __pyx_r;
   10480             : }
   10481             : 
   10482           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10483           0 :   Py_ssize_t __pyx_8genexpr2__pyx_v_suboffset;
   10484           0 :   PyObject *__pyx_r = NULL;
   10485             :   __Pyx_RefNannyDeclarations
   10486           0 :   int __pyx_t_1;
   10487           0 :   PyObject *__pyx_t_2 = NULL;
   10488           0 :   Py_ssize_t *__pyx_t_3;
   10489           0 :   Py_ssize_t *__pyx_t_4;
   10490           0 :   Py_ssize_t *__pyx_t_5;
   10491           0 :   PyObject *__pyx_t_6 = NULL;
   10492           0 :   int __pyx_lineno = 0;
   10493           0 :   const char *__pyx_filename = NULL;
   10494           0 :   int __pyx_clineno = 0;
   10495           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10496             : 
   10497             :   /* "View.MemoryView":581
   10498             :  *     @property
   10499             :  *     def suboffsets(self):
   10500             :  *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
   10501             :  *             return (-1,) * self.view.ndim
   10502             :  * 
   10503             :  */
   10504           0 :   __pyx_t_1 = (__pyx_v_self->view.suboffsets == NULL);
   10505           0 :   if (__pyx_t_1) {
   10506             : 
   10507             :     /* "View.MemoryView":582
   10508             :  *     def suboffsets(self):
   10509             :  *         if self.view.suboffsets == NULL:
   10510             :  *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
   10511             :  * 
   10512             :  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
   10513             :  */
   10514           0 :     __Pyx_XDECREF(__pyx_r);
   10515           0 :     __pyx_t_2 = __Pyx_PySequence_Multiply(__pyx_tuple__4, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 582, __pyx_L1_error)
   10516           0 :     __Pyx_GOTREF(__pyx_t_2);
   10517           0 :     __pyx_r = __pyx_t_2;
   10518           0 :     __pyx_t_2 = 0;
   10519           0 :     goto __pyx_L0;
   10520             : 
   10521             :     /* "View.MemoryView":581
   10522             :  *     @property
   10523             :  *     def suboffsets(self):
   10524             :  *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
   10525             :  *             return (-1,) * self.view.ndim
   10526             :  * 
   10527             :  */
   10528             :   }
   10529             : 
   10530             :   /* "View.MemoryView":584
   10531             :  *             return (-1,) * self.view.ndim
   10532             :  * 
   10533             :  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])             # <<<<<<<<<<<<<<
   10534             :  * 
   10535             :  *     @property
   10536             :  */
   10537           0 :   __Pyx_XDECREF(__pyx_r);
   10538             :   { /* enter inner scope */
   10539           0 :     __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 584, __pyx_L1_error)
   10540           0 :     __Pyx_GOTREF(__pyx_t_2);
   10541           0 :     __pyx_t_4 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
   10542           0 :     for (__pyx_t_5 = __pyx_v_self->view.suboffsets; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
   10543           0 :       __pyx_t_3 = __pyx_t_5;
   10544           0 :       __pyx_8genexpr2__pyx_v_suboffset = (__pyx_t_3[0]);
   10545           0 :       __pyx_t_6 = PyInt_FromSsize_t(__pyx_8genexpr2__pyx_v_suboffset); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 584, __pyx_L1_error)
   10546           0 :       __Pyx_GOTREF(__pyx_t_6);
   10547           0 :       if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 584, __pyx_L1_error)
   10548           0 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   10549             :     }
   10550             :   } /* exit inner scope */
   10551           0 :   __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 584, __pyx_L1_error)
   10552           0 :   __Pyx_GOTREF(__pyx_t_6);
   10553           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   10554           0 :   __pyx_r = __pyx_t_6;
   10555           0 :   __pyx_t_6 = 0;
   10556           0 :   goto __pyx_L0;
   10557             : 
   10558             :   /* "View.MemoryView":579
   10559             :  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
   10560             :  * 
   10561             :  *     @property             # <<<<<<<<<<<<<<
   10562             :  *     def suboffsets(self):
   10563             :  *         if self.view.suboffsets == NULL:
   10564             :  */
   10565             : 
   10566             :   /* function exit code */
   10567           0 :   __pyx_L1_error:;
   10568           0 :   __Pyx_XDECREF(__pyx_t_2);
   10569           0 :   __Pyx_XDECREF(__pyx_t_6);
   10570           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10571           0 :   __pyx_r = NULL;
   10572           0 :   __pyx_L0:;
   10573           0 :   __Pyx_XGIVEREF(__pyx_r);
   10574           0 :   __Pyx_RefNannyFinishContext();
   10575           0 :   return __pyx_r;
   10576             : }
   10577             : 
   10578             : /* "View.MemoryView":586
   10579             :  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
   10580             :  * 
   10581             :  *     @property             # <<<<<<<<<<<<<<
   10582             :  *     def ndim(self):
   10583             :  *         return self.view.ndim
   10584             :  */
   10585             : 
   10586             : /* Python wrapper */
   10587             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
   10588           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
   10589           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10590           0 :   PyObject *__pyx_r = 0;
   10591             :   __Pyx_RefNannyDeclarations
   10592           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10593           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10594           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10595             : 
   10596             :   /* function exit code */
   10597           0 :   __Pyx_RefNannyFinishContext();
   10598           0 :   return __pyx_r;
   10599             : }
   10600             : 
   10601           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10602           0 :   PyObject *__pyx_r = NULL;
   10603             :   __Pyx_RefNannyDeclarations
   10604           0 :   PyObject *__pyx_t_1 = NULL;
   10605           0 :   int __pyx_lineno = 0;
   10606           0 :   const char *__pyx_filename = NULL;
   10607           0 :   int __pyx_clineno = 0;
   10608           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10609             : 
   10610             :   /* "View.MemoryView":588
   10611             :  *     @property
   10612             :  *     def ndim(self):
   10613             :  *         return self.view.ndim             # <<<<<<<<<<<<<<
   10614             :  * 
   10615             :  *     @property
   10616             :  */
   10617           0 :   __Pyx_XDECREF(__pyx_r);
   10618           0 :   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 588, __pyx_L1_error)
   10619           0 :   __Pyx_GOTREF(__pyx_t_1);
   10620           0 :   __pyx_r = __pyx_t_1;
   10621           0 :   __pyx_t_1 = 0;
   10622           0 :   goto __pyx_L0;
   10623             : 
   10624             :   /* "View.MemoryView":586
   10625             :  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
   10626             :  * 
   10627             :  *     @property             # <<<<<<<<<<<<<<
   10628             :  *     def ndim(self):
   10629             :  *         return self.view.ndim
   10630             :  */
   10631             : 
   10632             :   /* function exit code */
   10633           0 :   __pyx_L1_error:;
   10634           0 :   __Pyx_XDECREF(__pyx_t_1);
   10635           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10636           0 :   __pyx_r = NULL;
   10637           0 :   __pyx_L0:;
   10638           0 :   __Pyx_XGIVEREF(__pyx_r);
   10639           0 :   __Pyx_RefNannyFinishContext();
   10640           0 :   return __pyx_r;
   10641             : }
   10642             : 
   10643             : /* "View.MemoryView":590
   10644             :  *         return self.view.ndim
   10645             :  * 
   10646             :  *     @property             # <<<<<<<<<<<<<<
   10647             :  *     def itemsize(self):
   10648             :  *         return self.view.itemsize
   10649             :  */
   10650             : 
   10651             : /* Python wrapper */
   10652             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
   10653           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
   10654           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10655           0 :   PyObject *__pyx_r = 0;
   10656             :   __Pyx_RefNannyDeclarations
   10657           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10658           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10659           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10660             : 
   10661             :   /* function exit code */
   10662           0 :   __Pyx_RefNannyFinishContext();
   10663           0 :   return __pyx_r;
   10664             : }
   10665             : 
   10666           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10667           0 :   PyObject *__pyx_r = NULL;
   10668             :   __Pyx_RefNannyDeclarations
   10669           0 :   PyObject *__pyx_t_1 = NULL;
   10670           0 :   int __pyx_lineno = 0;
   10671           0 :   const char *__pyx_filename = NULL;
   10672           0 :   int __pyx_clineno = 0;
   10673           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10674             : 
   10675             :   /* "View.MemoryView":592
   10676             :  *     @property
   10677             :  *     def itemsize(self):
   10678             :  *         return self.view.itemsize             # <<<<<<<<<<<<<<
   10679             :  * 
   10680             :  *     @property
   10681             :  */
   10682           0 :   __Pyx_XDECREF(__pyx_r);
   10683           0 :   __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 592, __pyx_L1_error)
   10684           0 :   __Pyx_GOTREF(__pyx_t_1);
   10685           0 :   __pyx_r = __pyx_t_1;
   10686           0 :   __pyx_t_1 = 0;
   10687           0 :   goto __pyx_L0;
   10688             : 
   10689             :   /* "View.MemoryView":590
   10690             :  *         return self.view.ndim
   10691             :  * 
   10692             :  *     @property             # <<<<<<<<<<<<<<
   10693             :  *     def itemsize(self):
   10694             :  *         return self.view.itemsize
   10695             :  */
   10696             : 
   10697             :   /* function exit code */
   10698           0 :   __pyx_L1_error:;
   10699           0 :   __Pyx_XDECREF(__pyx_t_1);
   10700           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10701           0 :   __pyx_r = NULL;
   10702           0 :   __pyx_L0:;
   10703           0 :   __Pyx_XGIVEREF(__pyx_r);
   10704           0 :   __Pyx_RefNannyFinishContext();
   10705           0 :   return __pyx_r;
   10706             : }
   10707             : 
   10708             : /* "View.MemoryView":594
   10709             :  *         return self.view.itemsize
   10710             :  * 
   10711             :  *     @property             # <<<<<<<<<<<<<<
   10712             :  *     def nbytes(self):
   10713             :  *         return self.size * self.view.itemsize
   10714             :  */
   10715             : 
   10716             : /* Python wrapper */
   10717             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
   10718           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
   10719           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10720           0 :   PyObject *__pyx_r = 0;
   10721             :   __Pyx_RefNannyDeclarations
   10722           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10723           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10724           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10725             : 
   10726             :   /* function exit code */
   10727           0 :   __Pyx_RefNannyFinishContext();
   10728           0 :   return __pyx_r;
   10729             : }
   10730             : 
   10731           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10732           0 :   PyObject *__pyx_r = NULL;
   10733             :   __Pyx_RefNannyDeclarations
   10734           0 :   PyObject *__pyx_t_1 = NULL;
   10735           0 :   PyObject *__pyx_t_2 = NULL;
   10736           0 :   PyObject *__pyx_t_3 = NULL;
   10737           0 :   int __pyx_lineno = 0;
   10738           0 :   const char *__pyx_filename = NULL;
   10739           0 :   int __pyx_clineno = 0;
   10740           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10741             : 
   10742             :   /* "View.MemoryView":596
   10743             :  *     @property
   10744             :  *     def nbytes(self):
   10745             :  *         return self.size * self.view.itemsize             # <<<<<<<<<<<<<<
   10746             :  * 
   10747             :  *     @property
   10748             :  */
   10749           0 :   __Pyx_XDECREF(__pyx_r);
   10750           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 596, __pyx_L1_error)
   10751           0 :   __Pyx_GOTREF(__pyx_t_1);
   10752           0 :   __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 596, __pyx_L1_error)
   10753           0 :   __Pyx_GOTREF(__pyx_t_2);
   10754           0 :   __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 596, __pyx_L1_error)
   10755           0 :   __Pyx_GOTREF(__pyx_t_3);
   10756           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   10757           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   10758           0 :   __pyx_r = __pyx_t_3;
   10759           0 :   __pyx_t_3 = 0;
   10760           0 :   goto __pyx_L0;
   10761             : 
   10762             :   /* "View.MemoryView":594
   10763             :  *         return self.view.itemsize
   10764             :  * 
   10765             :  *     @property             # <<<<<<<<<<<<<<
   10766             :  *     def nbytes(self):
   10767             :  *         return self.size * self.view.itemsize
   10768             :  */
   10769             : 
   10770             :   /* function exit code */
   10771           0 :   __pyx_L1_error:;
   10772           0 :   __Pyx_XDECREF(__pyx_t_1);
   10773           0 :   __Pyx_XDECREF(__pyx_t_2);
   10774           0 :   __Pyx_XDECREF(__pyx_t_3);
   10775           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10776           0 :   __pyx_r = NULL;
   10777           0 :   __pyx_L0:;
   10778           0 :   __Pyx_XGIVEREF(__pyx_r);
   10779           0 :   __Pyx_RefNannyFinishContext();
   10780           0 :   return __pyx_r;
   10781             : }
   10782             : 
   10783             : /* "View.MemoryView":598
   10784             :  *         return self.size * self.view.itemsize
   10785             :  * 
   10786             :  *     @property             # <<<<<<<<<<<<<<
   10787             :  *     def size(self):
   10788             :  *         if self._size is None:
   10789             :  */
   10790             : 
   10791             : /* Python wrapper */
   10792             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
   10793           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
   10794           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10795           0 :   PyObject *__pyx_r = 0;
   10796             :   __Pyx_RefNannyDeclarations
   10797           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10798           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10799           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10800             : 
   10801             :   /* function exit code */
   10802           0 :   __Pyx_RefNannyFinishContext();
   10803           0 :   return __pyx_r;
   10804             : }
   10805             : 
   10806           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10807           0 :   PyObject *__pyx_v_result = NULL;
   10808           0 :   PyObject *__pyx_v_length = NULL;
   10809           0 :   PyObject *__pyx_r = NULL;
   10810             :   __Pyx_RefNannyDeclarations
   10811           0 :   int __pyx_t_1;
   10812           0 :   Py_ssize_t *__pyx_t_2;
   10813           0 :   Py_ssize_t *__pyx_t_3;
   10814           0 :   Py_ssize_t *__pyx_t_4;
   10815           0 :   PyObject *__pyx_t_5 = NULL;
   10816           0 :   int __pyx_lineno = 0;
   10817           0 :   const char *__pyx_filename = NULL;
   10818           0 :   int __pyx_clineno = 0;
   10819           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10820             : 
   10821             :   /* "View.MemoryView":600
   10822             :  *     @property
   10823             :  *     def size(self):
   10824             :  *         if self._size is None:             # <<<<<<<<<<<<<<
   10825             :  *             result = 1
   10826             :  * 
   10827             :  */
   10828           0 :   __pyx_t_1 = (__pyx_v_self->_size == Py_None);
   10829           0 :   if (__pyx_t_1) {
   10830             : 
   10831             :     /* "View.MemoryView":601
   10832             :  *     def size(self):
   10833             :  *         if self._size is None:
   10834             :  *             result = 1             # <<<<<<<<<<<<<<
   10835             :  * 
   10836             :  *             for length in self.view.shape[:self.view.ndim]:
   10837             :  */
   10838           0 :     __Pyx_INCREF(__pyx_int_1);
   10839           0 :     __pyx_v_result = __pyx_int_1;
   10840             : 
   10841             :     /* "View.MemoryView":603
   10842             :  *             result = 1
   10843             :  * 
   10844             :  *             for length in self.view.shape[:self.view.ndim]:             # <<<<<<<<<<<<<<
   10845             :  *                 result *= length
   10846             :  * 
   10847             :  */
   10848           0 :     __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
   10849           0 :     for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
   10850           0 :       __pyx_t_2 = __pyx_t_4;
   10851           0 :       __pyx_t_5 = PyInt_FromSsize_t((__pyx_t_2[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 603, __pyx_L1_error)
   10852           0 :       __Pyx_GOTREF(__pyx_t_5);
   10853           0 :       __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_5);
   10854           0 :       __pyx_t_5 = 0;
   10855             : 
   10856             :       /* "View.MemoryView":604
   10857             :  * 
   10858             :  *             for length in self.view.shape[:self.view.ndim]:
   10859             :  *                 result *= length             # <<<<<<<<<<<<<<
   10860             :  * 
   10861             :  *             self._size = result
   10862             :  */
   10863           0 :       __pyx_t_5 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 604, __pyx_L1_error)
   10864           0 :       __Pyx_GOTREF(__pyx_t_5);
   10865           0 :       __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5);
   10866           0 :       __pyx_t_5 = 0;
   10867             :     }
   10868             : 
   10869             :     /* "View.MemoryView":606
   10870             :  *                 result *= length
   10871             :  * 
   10872             :  *             self._size = result             # <<<<<<<<<<<<<<
   10873             :  * 
   10874             :  *         return self._size
   10875             :  */
   10876           0 :     __Pyx_INCREF(__pyx_v_result);
   10877           0 :     __Pyx_GIVEREF(__pyx_v_result);
   10878           0 :     __Pyx_GOTREF(__pyx_v_self->_size);
   10879           0 :     __Pyx_DECREF(__pyx_v_self->_size);
   10880           0 :     __pyx_v_self->_size = __pyx_v_result;
   10881             : 
   10882             :     /* "View.MemoryView":600
   10883             :  *     @property
   10884             :  *     def size(self):
   10885             :  *         if self._size is None:             # <<<<<<<<<<<<<<
   10886             :  *             result = 1
   10887             :  * 
   10888             :  */
   10889             :   }
   10890             : 
   10891             :   /* "View.MemoryView":608
   10892             :  *             self._size = result
   10893             :  * 
   10894             :  *         return self._size             # <<<<<<<<<<<<<<
   10895             :  * 
   10896             :  *     def __len__(self):
   10897             :  */
   10898           0 :   __Pyx_XDECREF(__pyx_r);
   10899           0 :   __Pyx_INCREF(__pyx_v_self->_size);
   10900           0 :   __pyx_r = __pyx_v_self->_size;
   10901           0 :   goto __pyx_L0;
   10902             : 
   10903             :   /* "View.MemoryView":598
   10904             :  *         return self.size * self.view.itemsize
   10905             :  * 
   10906             :  *     @property             # <<<<<<<<<<<<<<
   10907             :  *     def size(self):
   10908             :  *         if self._size is None:
   10909             :  */
   10910             : 
   10911             :   /* function exit code */
   10912           0 :   __pyx_L1_error:;
   10913           0 :   __Pyx_XDECREF(__pyx_t_5);
   10914           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10915           0 :   __pyx_r = NULL;
   10916           0 :   __pyx_L0:;
   10917           0 :   __Pyx_XDECREF(__pyx_v_result);
   10918           0 :   __Pyx_XDECREF(__pyx_v_length);
   10919           0 :   __Pyx_XGIVEREF(__pyx_r);
   10920           0 :   __Pyx_RefNannyFinishContext();
   10921           0 :   return __pyx_r;
   10922             : }
   10923             : 
   10924             : /* "View.MemoryView":610
   10925             :  *         return self._size
   10926             :  * 
   10927             :  *     def __len__(self):             # <<<<<<<<<<<<<<
   10928             :  *         if self.view.ndim >= 1:
   10929             :  *             return self.view.shape[0]
   10930             :  */
   10931             : 
   10932             : /* Python wrapper */
   10933             : static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
   10934           0 : static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
   10935           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10936           0 :   Py_ssize_t __pyx_r;
   10937             :   __Pyx_RefNannyDeclarations
   10938           0 :   __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
   10939           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10940           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10941             : 
   10942             :   /* function exit code */
   10943           0 :   __Pyx_RefNannyFinishContext();
   10944           0 :   return __pyx_r;
   10945             : }
   10946             : 
   10947           0 : static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10948           0 :   Py_ssize_t __pyx_r;
   10949           0 :   int __pyx_t_1;
   10950             : 
   10951             :   /* "View.MemoryView":611
   10952             :  * 
   10953             :  *     def __len__(self):
   10954             :  *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
   10955             :  *             return self.view.shape[0]
   10956             :  * 
   10957             :  */
   10958           0 :   __pyx_t_1 = (__pyx_v_self->view.ndim >= 1);
   10959           0 :   if (__pyx_t_1) {
   10960             : 
   10961             :     /* "View.MemoryView":612
   10962             :  *     def __len__(self):
   10963             :  *         if self.view.ndim >= 1:
   10964             :  *             return self.view.shape[0]             # <<<<<<<<<<<<<<
   10965             :  * 
   10966             :  *         return 0
   10967             :  */
   10968           0 :     __pyx_r = (__pyx_v_self->view.shape[0]);
   10969           0 :     goto __pyx_L0;
   10970             : 
   10971             :     /* "View.MemoryView":611
   10972             :  * 
   10973             :  *     def __len__(self):
   10974             :  *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
   10975             :  *             return self.view.shape[0]
   10976             :  * 
   10977             :  */
   10978             :   }
   10979             : 
   10980             :   /* "View.MemoryView":614
   10981             :  *             return self.view.shape[0]
   10982             :  * 
   10983             :  *         return 0             # <<<<<<<<<<<<<<
   10984             :  * 
   10985             :  *     def __repr__(self):
   10986             :  */
   10987           0 :   __pyx_r = 0;
   10988           0 :   goto __pyx_L0;
   10989             : 
   10990             :   /* "View.MemoryView":610
   10991             :  *         return self._size
   10992             :  * 
   10993             :  *     def __len__(self):             # <<<<<<<<<<<<<<
   10994             :  *         if self.view.ndim >= 1:
   10995             :  *             return self.view.shape[0]
   10996             :  */
   10997             : 
   10998             :   /* function exit code */
   10999           0 :   __pyx_L0:;
   11000           0 :   return __pyx_r;
   11001             : }
   11002             : 
   11003             : /* "View.MemoryView":616
   11004             :  *         return 0
   11005             :  * 
   11006             :  *     def __repr__(self):             # <<<<<<<<<<<<<<
   11007             :  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
   11008             :  *                                                id(self))
   11009             :  */
   11010             : 
   11011             : /* Python wrapper */
   11012             : static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
   11013           0 : static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
   11014           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11015           0 :   PyObject *__pyx_r = 0;
   11016             :   __Pyx_RefNannyDeclarations
   11017           0 :   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
   11018           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   11019           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11020             : 
   11021             :   /* function exit code */
   11022           0 :   __Pyx_RefNannyFinishContext();
   11023           0 :   return __pyx_r;
   11024             : }
   11025             : 
   11026           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
   11027           0 :   PyObject *__pyx_r = NULL;
   11028             :   __Pyx_RefNannyDeclarations
   11029           0 :   PyObject *__pyx_t_1 = NULL;
   11030           0 :   PyObject *__pyx_t_2 = NULL;
   11031           0 :   PyObject *__pyx_t_3 = NULL;
   11032           0 :   int __pyx_lineno = 0;
   11033           0 :   const char *__pyx_filename = NULL;
   11034           0 :   int __pyx_clineno = 0;
   11035           0 :   __Pyx_RefNannySetupContext("__repr__", 1);
   11036             : 
   11037             :   /* "View.MemoryView":617
   11038             :  * 
   11039             :  *     def __repr__(self):
   11040             :  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
   11041             :  *                                                id(self))
   11042             :  * 
   11043             :  */
   11044           0 :   __Pyx_XDECREF(__pyx_r);
   11045           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error)
   11046           0 :   __Pyx_GOTREF(__pyx_t_1);
   11047           0 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error)
   11048           0 :   __Pyx_GOTREF(__pyx_t_2);
   11049           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   11050           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error)
   11051           0 :   __Pyx_GOTREF(__pyx_t_1);
   11052           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   11053             : 
   11054             :   /* "View.MemoryView":618
   11055             :  *     def __repr__(self):
   11056             :  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
   11057             :  *                                                id(self))             # <<<<<<<<<<<<<<
   11058             :  * 
   11059             :  *     def __str__(self):
   11060             :  */
   11061           0 :   __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __pyx_L1_error)
   11062           0 :   __Pyx_GOTREF(__pyx_t_2);
   11063             : 
   11064             :   /* "View.MemoryView":617
   11065             :  * 
   11066             :  *     def __repr__(self):
   11067             :  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
   11068             :  *                                                id(self))
   11069             :  * 
   11070             :  */
   11071           0 :   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 617, __pyx_L1_error)
   11072           0 :   __Pyx_GOTREF(__pyx_t_3);
   11073           0 :   __Pyx_GIVEREF(__pyx_t_1);
   11074           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error);
   11075           0 :   __Pyx_GIVEREF(__pyx_t_2);
   11076           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error);
   11077           0 :   __pyx_t_1 = 0;
   11078           0 :   __pyx_t_2 = 0;
   11079           0 :   __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error)
   11080           0 :   __Pyx_GOTREF(__pyx_t_2);
   11081           0 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   11082           0 :   __pyx_r = __pyx_t_2;
   11083           0 :   __pyx_t_2 = 0;
   11084           0 :   goto __pyx_L0;
   11085             : 
   11086             :   /* "View.MemoryView":616
   11087             :  *         return 0
   11088             :  * 
   11089             :  *     def __repr__(self):             # <<<<<<<<<<<<<<
   11090             :  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
   11091             :  *                                                id(self))
   11092             :  */
   11093             : 
   11094             :   /* function exit code */
   11095           0 :   __pyx_L1_error:;
   11096           0 :   __Pyx_XDECREF(__pyx_t_1);
   11097           0 :   __Pyx_XDECREF(__pyx_t_2);
   11098           0 :   __Pyx_XDECREF(__pyx_t_3);
   11099           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11100           0 :   __pyx_r = NULL;
   11101           0 :   __pyx_L0:;
   11102           0 :   __Pyx_XGIVEREF(__pyx_r);
   11103           0 :   __Pyx_RefNannyFinishContext();
   11104           0 :   return __pyx_r;
   11105             : }
   11106             : 
   11107             : /* "View.MemoryView":620
   11108             :  *                                                id(self))
   11109             :  * 
   11110             :  *     def __str__(self):             # <<<<<<<<<<<<<<
   11111             :  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
   11112             :  * 
   11113             :  */
   11114             : 
   11115             : /* Python wrapper */
   11116             : static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
   11117           0 : static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
   11118           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11119           0 :   PyObject *__pyx_r = 0;
   11120             :   __Pyx_RefNannyDeclarations
   11121           0 :   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
   11122           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   11123           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11124             : 
   11125             :   /* function exit code */
   11126           0 :   __Pyx_RefNannyFinishContext();
   11127           0 :   return __pyx_r;
   11128             : }
   11129             : 
   11130           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
   11131           0 :   PyObject *__pyx_r = NULL;
   11132             :   __Pyx_RefNannyDeclarations
   11133           0 :   PyObject *__pyx_t_1 = NULL;
   11134           0 :   PyObject *__pyx_t_2 = NULL;
   11135           0 :   int __pyx_lineno = 0;
   11136           0 :   const char *__pyx_filename = NULL;
   11137           0 :   int __pyx_clineno = 0;
   11138           0 :   __Pyx_RefNannySetupContext("__str__", 1);
   11139             : 
   11140             :   /* "View.MemoryView":621
   11141             :  * 
   11142             :  *     def __str__(self):
   11143             :  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)             # <<<<<<<<<<<<<<
   11144             :  * 
   11145             :  * 
   11146             :  */
   11147           0 :   __Pyx_XDECREF(__pyx_r);
   11148           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error)
   11149           0 :   __Pyx_GOTREF(__pyx_t_1);
   11150           0 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 621, __pyx_L1_error)
   11151           0 :   __Pyx_GOTREF(__pyx_t_2);
   11152           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   11153           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error)
   11154           0 :   __Pyx_GOTREF(__pyx_t_1);
   11155           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   11156           0 :   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 621, __pyx_L1_error)
   11157           0 :   __Pyx_GOTREF(__pyx_t_2);
   11158           0 :   __Pyx_GIVEREF(__pyx_t_1);
   11159           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error);
   11160           0 :   __pyx_t_1 = 0;
   11161           0 :   __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error)
   11162           0 :   __Pyx_GOTREF(__pyx_t_1);
   11163           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   11164           0 :   __pyx_r = __pyx_t_1;
   11165           0 :   __pyx_t_1 = 0;
   11166           0 :   goto __pyx_L0;
   11167             : 
   11168             :   /* "View.MemoryView":620
   11169             :  *                                                id(self))
   11170             :  * 
   11171             :  *     def __str__(self):             # <<<<<<<<<<<<<<
   11172             :  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
   11173             :  * 
   11174             :  */
   11175             : 
   11176             :   /* function exit code */
   11177           0 :   __pyx_L1_error:;
   11178           0 :   __Pyx_XDECREF(__pyx_t_1);
   11179           0 :   __Pyx_XDECREF(__pyx_t_2);
   11180           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11181           0 :   __pyx_r = NULL;
   11182           0 :   __pyx_L0:;
   11183           0 :   __Pyx_XGIVEREF(__pyx_r);
   11184           0 :   __Pyx_RefNannyFinishContext();
   11185           0 :   return __pyx_r;
   11186             : }
   11187             : 
   11188             : /* "View.MemoryView":624
   11189             :  * 
   11190             :  * 
   11191             :  *     def is_c_contig(self):             # <<<<<<<<<<<<<<
   11192             :  *         cdef __Pyx_memviewslice *mslice
   11193             :  *         cdef __Pyx_memviewslice tmp
   11194             :  */
   11195             : 
   11196             : /* Python wrapper */
   11197             : static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, 
   11198             : #if CYTHON_METH_FASTCALL
   11199             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11200             : #else
   11201             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11202             : #endif
   11203             : ); /*proto*/
   11204           0 : static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, 
   11205             : #if CYTHON_METH_FASTCALL
   11206             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11207             : #else
   11208             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11209             : #endif
   11210             : ) {
   11211             :   #if !CYTHON_METH_FASTCALL
   11212             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11213             :   #endif
   11214           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11215           0 :   PyObject *__pyx_r = 0;
   11216             :   __Pyx_RefNannyDeclarations
   11217           0 :   __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
   11218             :   #if !CYTHON_METH_FASTCALL
   11219             :   #if CYTHON_ASSUME_SAFE_MACROS
   11220             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11221             :   #else
   11222             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11223             :   #endif
   11224             :   #endif
   11225           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   11226           0 :   if (unlikely(__pyx_nargs > 0)) {
   11227           0 :     __Pyx_RaiseArgtupleInvalid("is_c_contig", 1, 0, 0, __pyx_nargs); return NULL;}
   11228           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_c_contig", 0))) return NULL;
   11229           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11230             : 
   11231             :   /* function exit code */
   11232           0 :   __Pyx_RefNannyFinishContext();
   11233           0 :   return __pyx_r;
   11234             : }
   11235             : 
   11236           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
   11237           0 :   __Pyx_memviewslice *__pyx_v_mslice;
   11238           0 :   __Pyx_memviewslice __pyx_v_tmp;
   11239           0 :   PyObject *__pyx_r = NULL;
   11240             :   __Pyx_RefNannyDeclarations
   11241           0 :   __Pyx_memviewslice *__pyx_t_1;
   11242           0 :   PyObject *__pyx_t_2 = NULL;
   11243           0 :   int __pyx_lineno = 0;
   11244           0 :   const char *__pyx_filename = NULL;
   11245           0 :   int __pyx_clineno = 0;
   11246           0 :   __Pyx_RefNannySetupContext("is_c_contig", 1);
   11247             : 
   11248             :   /* "View.MemoryView":627
   11249             :  *         cdef __Pyx_memviewslice *mslice
   11250             :  *         cdef __Pyx_memviewslice tmp
   11251             :  *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
   11252             :  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
   11253             :  * 
   11254             :  */
   11255           0 :   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 627, __pyx_L1_error)
   11256           0 :   __pyx_v_mslice = __pyx_t_1;
   11257             : 
   11258             :   /* "View.MemoryView":628
   11259             :  *         cdef __Pyx_memviewslice tmp
   11260             :  *         mslice = get_slice_from_memview(self, &tmp)
   11261             :  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)             # <<<<<<<<<<<<<<
   11262             :  * 
   11263             :  *     def is_f_contig(self):
   11264             :  */
   11265           0 :   __Pyx_XDECREF(__pyx_r);
   11266           0 :   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 628, __pyx_L1_error)
   11267           0 :   __Pyx_GOTREF(__pyx_t_2);
   11268           0 :   __pyx_r = __pyx_t_2;
   11269           0 :   __pyx_t_2 = 0;
   11270           0 :   goto __pyx_L0;
   11271             : 
   11272             :   /* "View.MemoryView":624
   11273             :  * 
   11274             :  * 
   11275             :  *     def is_c_contig(self):             # <<<<<<<<<<<<<<
   11276             :  *         cdef __Pyx_memviewslice *mslice
   11277             :  *         cdef __Pyx_memviewslice tmp
   11278             :  */
   11279             : 
   11280             :   /* function exit code */
   11281           0 :   __pyx_L1_error:;
   11282           0 :   __Pyx_XDECREF(__pyx_t_2);
   11283           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11284           0 :   __pyx_r = NULL;
   11285           0 :   __pyx_L0:;
   11286           0 :   __Pyx_XGIVEREF(__pyx_r);
   11287           0 :   __Pyx_RefNannyFinishContext();
   11288           0 :   return __pyx_r;
   11289             : }
   11290             : 
   11291             : /* "View.MemoryView":630
   11292             :  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
   11293             :  * 
   11294             :  *     def is_f_contig(self):             # <<<<<<<<<<<<<<
   11295             :  *         cdef __Pyx_memviewslice *mslice
   11296             :  *         cdef __Pyx_memviewslice tmp
   11297             :  */
   11298             : 
   11299             : /* Python wrapper */
   11300             : static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, 
   11301             : #if CYTHON_METH_FASTCALL
   11302             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11303             : #else
   11304             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11305             : #endif
   11306             : ); /*proto*/
   11307           0 : static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, 
   11308             : #if CYTHON_METH_FASTCALL
   11309             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11310             : #else
   11311             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11312             : #endif
   11313             : ) {
   11314             :   #if !CYTHON_METH_FASTCALL
   11315             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11316             :   #endif
   11317           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11318           0 :   PyObject *__pyx_r = 0;
   11319             :   __Pyx_RefNannyDeclarations
   11320           0 :   __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
   11321             :   #if !CYTHON_METH_FASTCALL
   11322             :   #if CYTHON_ASSUME_SAFE_MACROS
   11323             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11324             :   #else
   11325             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11326             :   #endif
   11327             :   #endif
   11328           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   11329           0 :   if (unlikely(__pyx_nargs > 0)) {
   11330           0 :     __Pyx_RaiseArgtupleInvalid("is_f_contig", 1, 0, 0, __pyx_nargs); return NULL;}
   11331           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_f_contig", 0))) return NULL;
   11332           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11333             : 
   11334             :   /* function exit code */
   11335           0 :   __Pyx_RefNannyFinishContext();
   11336           0 :   return __pyx_r;
   11337             : }
   11338             : 
   11339           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
   11340           0 :   __Pyx_memviewslice *__pyx_v_mslice;
   11341           0 :   __Pyx_memviewslice __pyx_v_tmp;
   11342           0 :   PyObject *__pyx_r = NULL;
   11343             :   __Pyx_RefNannyDeclarations
   11344           0 :   __Pyx_memviewslice *__pyx_t_1;
   11345           0 :   PyObject *__pyx_t_2 = NULL;
   11346           0 :   int __pyx_lineno = 0;
   11347           0 :   const char *__pyx_filename = NULL;
   11348           0 :   int __pyx_clineno = 0;
   11349           0 :   __Pyx_RefNannySetupContext("is_f_contig", 1);
   11350             : 
   11351             :   /* "View.MemoryView":633
   11352             :  *         cdef __Pyx_memviewslice *mslice
   11353             :  *         cdef __Pyx_memviewslice tmp
   11354             :  *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
   11355             :  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
   11356             :  * 
   11357             :  */
   11358           0 :   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 633, __pyx_L1_error)
   11359           0 :   __pyx_v_mslice = __pyx_t_1;
   11360             : 
   11361             :   /* "View.MemoryView":634
   11362             :  *         cdef __Pyx_memviewslice tmp
   11363             :  *         mslice = get_slice_from_memview(self, &tmp)
   11364             :  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)             # <<<<<<<<<<<<<<
   11365             :  * 
   11366             :  *     def copy(self):
   11367             :  */
   11368           0 :   __Pyx_XDECREF(__pyx_r);
   11369           0 :   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 634, __pyx_L1_error)
   11370           0 :   __Pyx_GOTREF(__pyx_t_2);
   11371           0 :   __pyx_r = __pyx_t_2;
   11372           0 :   __pyx_t_2 = 0;
   11373           0 :   goto __pyx_L0;
   11374             : 
   11375             :   /* "View.MemoryView":630
   11376             :  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
   11377             :  * 
   11378             :  *     def is_f_contig(self):             # <<<<<<<<<<<<<<
   11379             :  *         cdef __Pyx_memviewslice *mslice
   11380             :  *         cdef __Pyx_memviewslice tmp
   11381             :  */
   11382             : 
   11383             :   /* function exit code */
   11384           0 :   __pyx_L1_error:;
   11385           0 :   __Pyx_XDECREF(__pyx_t_2);
   11386           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11387           0 :   __pyx_r = NULL;
   11388           0 :   __pyx_L0:;
   11389           0 :   __Pyx_XGIVEREF(__pyx_r);
   11390           0 :   __Pyx_RefNannyFinishContext();
   11391           0 :   return __pyx_r;
   11392             : }
   11393             : 
   11394             : /* "View.MemoryView":636
   11395             :  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
   11396             :  * 
   11397             :  *     def copy(self):             # <<<<<<<<<<<<<<
   11398             :  *         cdef __Pyx_memviewslice mslice
   11399             :  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
   11400             :  */
   11401             : 
   11402             : /* Python wrapper */
   11403             : static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, 
   11404             : #if CYTHON_METH_FASTCALL
   11405             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11406             : #else
   11407             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11408             : #endif
   11409             : ); /*proto*/
   11410           0 : static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, 
   11411             : #if CYTHON_METH_FASTCALL
   11412             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11413             : #else
   11414             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11415             : #endif
   11416             : ) {
   11417             :   #if !CYTHON_METH_FASTCALL
   11418             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11419             :   #endif
   11420           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11421           0 :   PyObject *__pyx_r = 0;
   11422             :   __Pyx_RefNannyDeclarations
   11423           0 :   __Pyx_RefNannySetupContext("copy (wrapper)", 0);
   11424             :   #if !CYTHON_METH_FASTCALL
   11425             :   #if CYTHON_ASSUME_SAFE_MACROS
   11426             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11427             :   #else
   11428             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11429             :   #endif
   11430             :   #endif
   11431           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   11432           0 :   if (unlikely(__pyx_nargs > 0)) {
   11433           0 :     __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, __pyx_nargs); return NULL;}
   11434           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy", 0))) return NULL;
   11435           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11436             : 
   11437             :   /* function exit code */
   11438           0 :   __Pyx_RefNannyFinishContext();
   11439           0 :   return __pyx_r;
   11440             : }
   11441             : 
   11442           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
   11443           0 :   __Pyx_memviewslice __pyx_v_mslice;
   11444           0 :   int __pyx_v_flags;
   11445           0 :   PyObject *__pyx_r = NULL;
   11446             :   __Pyx_RefNannyDeclarations
   11447           0 :   __Pyx_memviewslice __pyx_t_1;
   11448           0 :   PyObject *__pyx_t_2 = NULL;
   11449           0 :   int __pyx_lineno = 0;
   11450           0 :   const char *__pyx_filename = NULL;
   11451           0 :   int __pyx_clineno = 0;
   11452           0 :   __Pyx_RefNannySetupContext("copy", 1);
   11453             : 
   11454             :   /* "View.MemoryView":638
   11455             :  *     def copy(self):
   11456             :  *         cdef __Pyx_memviewslice mslice
   11457             :  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS             # <<<<<<<<<<<<<<
   11458             :  * 
   11459             :  *         slice_copy(self, &mslice)
   11460             :  */
   11461           0 :   __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));
   11462             : 
   11463             :   /* "View.MemoryView":640
   11464             :  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
   11465             :  * 
   11466             :  *         slice_copy(self, &mslice)             # <<<<<<<<<<<<<<
   11467             :  *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
   11468             :  *                                    self.view.itemsize,
   11469             :  */
   11470           0 :   __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));
   11471             : 
   11472             :   /* "View.MemoryView":641
   11473             :  * 
   11474             :  *         slice_copy(self, &mslice)
   11475             :  *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,             # <<<<<<<<<<<<<<
   11476             :  *                                    self.view.itemsize,
   11477             :  *                                    flags|PyBUF_C_CONTIGUOUS,
   11478             :  */
   11479           0 :   __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 641, __pyx_L1_error)
   11480           0 :   __pyx_v_mslice = __pyx_t_1;
   11481             : 
   11482             :   /* "View.MemoryView":646
   11483             :  *                                    self.dtype_is_object)
   11484             :  * 
   11485             :  *         return memoryview_copy_from_slice(self, &mslice)             # <<<<<<<<<<<<<<
   11486             :  * 
   11487             :  *     def copy_fortran(self):
   11488             :  */
   11489           0 :   __Pyx_XDECREF(__pyx_r);
   11490           0 :   __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 646, __pyx_L1_error)
   11491           0 :   __Pyx_GOTREF(__pyx_t_2);
   11492           0 :   __pyx_r = __pyx_t_2;
   11493           0 :   __pyx_t_2 = 0;
   11494           0 :   goto __pyx_L0;
   11495             : 
   11496             :   /* "View.MemoryView":636
   11497             :  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
   11498             :  * 
   11499             :  *     def copy(self):             # <<<<<<<<<<<<<<
   11500             :  *         cdef __Pyx_memviewslice mslice
   11501             :  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
   11502             :  */
   11503             : 
   11504             :   /* function exit code */
   11505           0 :   __pyx_L1_error:;
   11506           0 :   __Pyx_XDECREF(__pyx_t_2);
   11507           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11508           0 :   __pyx_r = NULL;
   11509           0 :   __pyx_L0:;
   11510           0 :   __Pyx_XGIVEREF(__pyx_r);
   11511           0 :   __Pyx_RefNannyFinishContext();
   11512           0 :   return __pyx_r;
   11513             : }
   11514             : 
   11515             : /* "View.MemoryView":648
   11516             :  *         return memoryview_copy_from_slice(self, &mslice)
   11517             :  * 
   11518             :  *     def copy_fortran(self):             # <<<<<<<<<<<<<<
   11519             :  *         cdef __Pyx_memviewslice src, dst
   11520             :  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
   11521             :  */
   11522             : 
   11523             : /* Python wrapper */
   11524             : static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, 
   11525             : #if CYTHON_METH_FASTCALL
   11526             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11527             : #else
   11528             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11529             : #endif
   11530             : ); /*proto*/
   11531           0 : static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, 
   11532             : #if CYTHON_METH_FASTCALL
   11533             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11534             : #else
   11535             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11536             : #endif
   11537             : ) {
   11538             :   #if !CYTHON_METH_FASTCALL
   11539             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11540             :   #endif
   11541           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11542           0 :   PyObject *__pyx_r = 0;
   11543             :   __Pyx_RefNannyDeclarations
   11544           0 :   __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
   11545             :   #if !CYTHON_METH_FASTCALL
   11546             :   #if CYTHON_ASSUME_SAFE_MACROS
   11547             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11548             :   #else
   11549             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11550             :   #endif
   11551             :   #endif
   11552           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   11553           0 :   if (unlikely(__pyx_nargs > 0)) {
   11554           0 :     __Pyx_RaiseArgtupleInvalid("copy_fortran", 1, 0, 0, __pyx_nargs); return NULL;}
   11555           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy_fortran", 0))) return NULL;
   11556           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11557             : 
   11558             :   /* function exit code */
   11559           0 :   __Pyx_RefNannyFinishContext();
   11560           0 :   return __pyx_r;
   11561             : }
   11562             : 
   11563           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
   11564           0 :   __Pyx_memviewslice __pyx_v_src;
   11565           0 :   __Pyx_memviewslice __pyx_v_dst;
   11566           0 :   int __pyx_v_flags;
   11567           0 :   PyObject *__pyx_r = NULL;
   11568             :   __Pyx_RefNannyDeclarations
   11569           0 :   __Pyx_memviewslice __pyx_t_1;
   11570           0 :   PyObject *__pyx_t_2 = NULL;
   11571           0 :   int __pyx_lineno = 0;
   11572           0 :   const char *__pyx_filename = NULL;
   11573           0 :   int __pyx_clineno = 0;
   11574           0 :   __Pyx_RefNannySetupContext("copy_fortran", 1);
   11575             : 
   11576             :   /* "View.MemoryView":650
   11577             :  *     def copy_fortran(self):
   11578             :  *         cdef __Pyx_memviewslice src, dst
   11579             :  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS             # <<<<<<<<<<<<<<
   11580             :  * 
   11581             :  *         slice_copy(self, &src)
   11582             :  */
   11583           0 :   __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));
   11584             : 
   11585             :   /* "View.MemoryView":652
   11586             :  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
   11587             :  * 
   11588             :  *         slice_copy(self, &src)             # <<<<<<<<<<<<<<
   11589             :  *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,
   11590             :  *                                 self.view.itemsize,
   11591             :  */
   11592           0 :   __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));
   11593             : 
   11594             :   /* "View.MemoryView":653
   11595             :  * 
   11596             :  *         slice_copy(self, &src)
   11597             :  *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,             # <<<<<<<<<<<<<<
   11598             :  *                                 self.view.itemsize,
   11599             :  *                                 flags|PyBUF_F_CONTIGUOUS,
   11600             :  */
   11601           0 :   __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 653, __pyx_L1_error)
   11602           0 :   __pyx_v_dst = __pyx_t_1;
   11603             : 
   11604             :   /* "View.MemoryView":658
   11605             :  *                                 self.dtype_is_object)
   11606             :  * 
   11607             :  *         return memoryview_copy_from_slice(self, &dst)             # <<<<<<<<<<<<<<
   11608             :  * 
   11609             :  * 
   11610             :  */
   11611           0 :   __Pyx_XDECREF(__pyx_r);
   11612           0 :   __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 658, __pyx_L1_error)
   11613           0 :   __Pyx_GOTREF(__pyx_t_2);
   11614           0 :   __pyx_r = __pyx_t_2;
   11615           0 :   __pyx_t_2 = 0;
   11616           0 :   goto __pyx_L0;
   11617             : 
   11618             :   /* "View.MemoryView":648
   11619             :  *         return memoryview_copy_from_slice(self, &mslice)
   11620             :  * 
   11621             :  *     def copy_fortran(self):             # <<<<<<<<<<<<<<
   11622             :  *         cdef __Pyx_memviewslice src, dst
   11623             :  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
   11624             :  */
   11625             : 
   11626             :   /* function exit code */
   11627           0 :   __pyx_L1_error:;
   11628           0 :   __Pyx_XDECREF(__pyx_t_2);
   11629           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11630           0 :   __pyx_r = NULL;
   11631           0 :   __pyx_L0:;
   11632           0 :   __Pyx_XGIVEREF(__pyx_r);
   11633           0 :   __Pyx_RefNannyFinishContext();
   11634           0 :   return __pyx_r;
   11635             : }
   11636             : 
   11637             : /* "(tree fragment)":1
   11638             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
   11639             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11640             :  * def __setstate_cython__(self, __pyx_state):
   11641             :  */
   11642             : 
   11643             : /* Python wrapper */
   11644             : static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, 
   11645             : #if CYTHON_METH_FASTCALL
   11646             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11647             : #else
   11648             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11649             : #endif
   11650             : ); /*proto*/
   11651           0 : static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, 
   11652             : #if CYTHON_METH_FASTCALL
   11653             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11654             : #else
   11655             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11656             : #endif
   11657             : ) {
   11658             :   #if !CYTHON_METH_FASTCALL
   11659             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11660             :   #endif
   11661           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11662           0 :   PyObject *__pyx_r = 0;
   11663             :   __Pyx_RefNannyDeclarations
   11664           0 :   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
   11665             :   #if !CYTHON_METH_FASTCALL
   11666             :   #if CYTHON_ASSUME_SAFE_MACROS
   11667             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11668             :   #else
   11669             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11670             :   #endif
   11671             :   #endif
   11672           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   11673           0 :   if (unlikely(__pyx_nargs > 0)) {
   11674           0 :     __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
   11675           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
   11676           0 :   __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11677             : 
   11678             :   /* function exit code */
   11679           0 :   __Pyx_RefNannyFinishContext();
   11680           0 :   return __pyx_r;
   11681             : }
   11682             : 
   11683           0 : static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
   11684           0 :   PyObject *__pyx_r = NULL;
   11685             :   __Pyx_RefNannyDeclarations
   11686           0 :   int __pyx_lineno = 0;
   11687           0 :   const char *__pyx_filename = NULL;
   11688           0 :   int __pyx_clineno = 0;
   11689           0 :   __Pyx_RefNannySetupContext("__reduce_cython__", 1);
   11690             : 
   11691             :   /* "(tree fragment)":2
   11692             :  * def __reduce_cython__(self):
   11693             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
   11694             :  * def __setstate_cython__(self, __pyx_state):
   11695             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11696             :  */
   11697           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
   11698           0 :   __PYX_ERR(1, 2, __pyx_L1_error)
   11699             : 
   11700             :   /* "(tree fragment)":1
   11701             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
   11702             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11703             :  * def __setstate_cython__(self, __pyx_state):
   11704             :  */
   11705             : 
   11706             :   /* function exit code */
   11707           0 :   __pyx_L1_error:;
   11708           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11709           0 :   __pyx_r = NULL;
   11710           0 :   __Pyx_XGIVEREF(__pyx_r);
   11711           0 :   __Pyx_RefNannyFinishContext();
   11712           0 :   return __pyx_r;
   11713             : }
   11714             : 
   11715             : /* "(tree fragment)":3
   11716             :  * def __reduce_cython__(self):
   11717             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11718             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
   11719             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11720             :  */
   11721             : 
   11722             : /* Python wrapper */
   11723             : static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, 
   11724             : #if CYTHON_METH_FASTCALL
   11725             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11726             : #else
   11727             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11728             : #endif
   11729             : ); /*proto*/
   11730           0 : static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, 
   11731             : #if CYTHON_METH_FASTCALL
   11732             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11733             : #else
   11734             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11735             : #endif
   11736             : ) {
   11737           0 :   CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
   11738             :   #if !CYTHON_METH_FASTCALL
   11739             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11740             :   #endif
   11741           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11742           0 :   PyObject* values[1] = {0};
   11743           0 :   int __pyx_lineno = 0;
   11744           0 :   const char *__pyx_filename = NULL;
   11745           0 :   int __pyx_clineno = 0;
   11746           0 :   PyObject *__pyx_r = 0;
   11747             :   __Pyx_RefNannyDeclarations
   11748           0 :   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
   11749             :   #if !CYTHON_METH_FASTCALL
   11750             :   #if CYTHON_ASSUME_SAFE_MACROS
   11751             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11752             :   #else
   11753             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11754             :   #endif
   11755             :   #endif
   11756           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   11757             :   {
   11758           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
   11759           0 :     if (__pyx_kwds) {
   11760           0 :       Py_ssize_t kw_args;
   11761           0 :       switch (__pyx_nargs) {
   11762           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   11763           0 :         CYTHON_FALLTHROUGH;
   11764           0 :         case  0: break;
   11765           0 :         default: goto __pyx_L5_argtuple_error;
   11766             :       }
   11767           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   11768           0 :       switch (__pyx_nargs) {
   11769             :         case  0:
   11770           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
   11771           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   11772           0 :           kw_args--;
   11773             :         }
   11774           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
   11775           0 :         else goto __pyx_L5_argtuple_error;
   11776             :       }
   11777           0 :       if (unlikely(kw_args > 0)) {
   11778           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   11779           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
   11780             :       }
   11781           0 :     } else if (unlikely(__pyx_nargs != 1)) {
   11782           0 :       goto __pyx_L5_argtuple_error;
   11783             :     } else {
   11784           0 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   11785             :     }
   11786           0 :     __pyx_v___pyx_state = values[0];
   11787             :   }
   11788           0 :   goto __pyx_L6_skip;
   11789           0 :   __pyx_L5_argtuple_error:;
   11790           0 :   __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
   11791           0 :   __pyx_L6_skip:;
   11792           0 :   goto __pyx_L4_argument_unpacking_done;
   11793           0 :   __pyx_L3_error:;
   11794             :   {
   11795           0 :     Py_ssize_t __pyx_temp;
   11796           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   11797             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   11798             :     }
   11799             :   }
   11800           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11801           0 :   __Pyx_RefNannyFinishContext();
   11802           0 :   return NULL;
   11803           0 :   __pyx_L4_argument_unpacking_done:;
   11804           0 :   __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v___pyx_state);
   11805             : 
   11806             :   /* function exit code */
   11807             :   {
   11808           0 :     Py_ssize_t __pyx_temp;
   11809           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   11810             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   11811             :     }
   11812             :   }
   11813             :   __Pyx_RefNannyFinishContext();
   11814             :   return __pyx_r;
   11815             : }
   11816             : 
   11817           0 : static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
   11818           0 :   PyObject *__pyx_r = NULL;
   11819             :   __Pyx_RefNannyDeclarations
   11820           0 :   int __pyx_lineno = 0;
   11821           0 :   const char *__pyx_filename = NULL;
   11822           0 :   int __pyx_clineno = 0;
   11823           0 :   __Pyx_RefNannySetupContext("__setstate_cython__", 1);
   11824             : 
   11825             :   /* "(tree fragment)":4
   11826             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11827             :  * def __setstate_cython__(self, __pyx_state):
   11828             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
   11829             :  */
   11830           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
   11831           0 :   __PYX_ERR(1, 4, __pyx_L1_error)
   11832             : 
   11833             :   /* "(tree fragment)":3
   11834             :  * def __reduce_cython__(self):
   11835             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11836             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
   11837             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11838             :  */
   11839             : 
   11840             :   /* function exit code */
   11841           0 :   __pyx_L1_error:;
   11842           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11843           0 :   __pyx_r = NULL;
   11844           0 :   __Pyx_XGIVEREF(__pyx_r);
   11845           0 :   __Pyx_RefNannyFinishContext();
   11846           0 :   return __pyx_r;
   11847             : }
   11848             : 
   11849             : /* "View.MemoryView":662
   11850             :  * 
   11851             :  * @cname('__pyx_memoryview_new')
   11852             :  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
   11853             :  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
   11854             :  *     result.typeinfo = typeinfo
   11855             :  */
   11856             : 
   11857        1964 : static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) {
   11858        1964 :   struct __pyx_memoryview_obj *__pyx_v_result = 0;
   11859        1964 :   PyObject *__pyx_r = NULL;
   11860             :   __Pyx_RefNannyDeclarations
   11861        1964 :   PyObject *__pyx_t_1 = NULL;
   11862        1964 :   PyObject *__pyx_t_2 = NULL;
   11863        1964 :   PyObject *__pyx_t_3 = NULL;
   11864        1964 :   int __pyx_lineno = 0;
   11865        1964 :   const char *__pyx_filename = NULL;
   11866        1964 :   int __pyx_clineno = 0;
   11867        1964 :   __Pyx_RefNannySetupContext("memoryview_cwrapper", 1);
   11868             : 
   11869             :   /* "View.MemoryView":663
   11870             :  * @cname('__pyx_memoryview_new')
   11871             :  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
   11872             :  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)             # <<<<<<<<<<<<<<
   11873             :  *     result.typeinfo = typeinfo
   11874             :  *     return result
   11875             :  */
   11876        1964 :   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 663, __pyx_L1_error)
   11877        1964 :   __Pyx_GOTREF(__pyx_t_1);
   11878        1964 :   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error)
   11879        1964 :   __Pyx_GOTREF(__pyx_t_2);
   11880        1964 :   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 663, __pyx_L1_error)
   11881        1964 :   __Pyx_GOTREF(__pyx_t_3);
   11882        1964 :   __Pyx_INCREF(__pyx_v_o);
   11883        1964 :   __Pyx_GIVEREF(__pyx_v_o);
   11884        1964 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o)) __PYX_ERR(1, 663, __pyx_L1_error);
   11885        1964 :   __Pyx_GIVEREF(__pyx_t_1);
   11886        1964 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 663, __pyx_L1_error);
   11887        1964 :   __Pyx_GIVEREF(__pyx_t_2);
   11888        1964 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error);
   11889        1964 :   __pyx_t_1 = 0;
   11890        1964 :   __pyx_t_2 = 0;
   11891        1964 :   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error)
   11892        1964 :   __Pyx_GOTREF(__pyx_t_2);
   11893        1964 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   11894        1964 :   __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
   11895        1964 :   __pyx_t_2 = 0;
   11896             : 
   11897             :   /* "View.MemoryView":664
   11898             :  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
   11899             :  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
   11900             :  *     result.typeinfo = typeinfo             # <<<<<<<<<<<<<<
   11901             :  *     return result
   11902             :  * 
   11903             :  */
   11904        1964 :   __pyx_v_result->typeinfo = __pyx_v_typeinfo;
   11905             : 
   11906             :   /* "View.MemoryView":665
   11907             :  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
   11908             :  *     result.typeinfo = typeinfo
   11909             :  *     return result             # <<<<<<<<<<<<<<
   11910             :  * 
   11911             :  * @cname('__pyx_memoryview_check')
   11912             :  */
   11913        1964 :   __Pyx_XDECREF(__pyx_r);
   11914        1964 :   __Pyx_INCREF((PyObject *)__pyx_v_result);
   11915        1964 :   __pyx_r = ((PyObject *)__pyx_v_result);
   11916        1964 :   goto __pyx_L0;
   11917             : 
   11918             :   /* "View.MemoryView":662
   11919             :  * 
   11920             :  * @cname('__pyx_memoryview_new')
   11921             :  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
   11922             :  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
   11923             :  *     result.typeinfo = typeinfo
   11924             :  */
   11925             : 
   11926             :   /* function exit code */
   11927           0 :   __pyx_L1_error:;
   11928           0 :   __Pyx_XDECREF(__pyx_t_1);
   11929           0 :   __Pyx_XDECREF(__pyx_t_2);
   11930           0 :   __Pyx_XDECREF(__pyx_t_3);
   11931           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11932           0 :   __pyx_r = 0;
   11933        1964 :   __pyx_L0:;
   11934        1964 :   __Pyx_XDECREF((PyObject *)__pyx_v_result);
   11935        1964 :   __Pyx_XGIVEREF(__pyx_r);
   11936        1964 :   __Pyx_RefNannyFinishContext();
   11937        1964 :   return __pyx_r;
   11938             : }
   11939             : 
   11940             : /* "View.MemoryView":668
   11941             :  * 
   11942             :  * @cname('__pyx_memoryview_check')
   11943             :  * cdef inline bint memoryview_check(object o) noexcept:             # <<<<<<<<<<<<<<
   11944             :  *     return isinstance(o, memoryview)
   11945             :  * 
   11946             :  */
   11947             : 
   11948        1964 : static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
   11949        1964 :   int __pyx_r;
   11950        1964 :   int __pyx_t_1;
   11951             : 
   11952             :   /* "View.MemoryView":669
   11953             :  * @cname('__pyx_memoryview_check')
   11954             :  * cdef inline bint memoryview_check(object o) noexcept:
   11955             :  *     return isinstance(o, memoryview)             # <<<<<<<<<<<<<<
   11956             :  * 
   11957             :  * cdef tuple _unellipsify(object index, int ndim):
   11958             :  */
   11959        1964 :   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type); 
   11960        1964 :   __pyx_r = __pyx_t_1;
   11961        1964 :   goto __pyx_L0;
   11962             : 
   11963             :   /* "View.MemoryView":668
   11964             :  * 
   11965             :  * @cname('__pyx_memoryview_check')
   11966             :  * cdef inline bint memoryview_check(object o) noexcept:             # <<<<<<<<<<<<<<
   11967             :  *     return isinstance(o, memoryview)
   11968             :  * 
   11969             :  */
   11970             : 
   11971             :   /* function exit code */
   11972        1964 :   __pyx_L0:;
   11973        1964 :   return __pyx_r;
   11974             : }
   11975             : 
   11976             : /* "View.MemoryView":671
   11977             :  *     return isinstance(o, memoryview)
   11978             :  * 
   11979             :  * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
   11980             :  *     """
   11981             :  *     Replace all ellipses with full slices and fill incomplete indices with
   11982             :  */
   11983             : 
   11984           0 : static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
   11985           0 :   Py_ssize_t __pyx_v_idx;
   11986           0 :   PyObject *__pyx_v_tup = NULL;
   11987           0 :   PyObject *__pyx_v_result = NULL;
   11988           0 :   int __pyx_v_have_slices;
   11989           0 :   int __pyx_v_seen_ellipsis;
   11990           0 :   PyObject *__pyx_v_item = NULL;
   11991           0 :   Py_ssize_t __pyx_v_nslices;
   11992           0 :   PyObject *__pyx_r = NULL;
   11993             :   __Pyx_RefNannyDeclarations
   11994           0 :   PyObject *__pyx_t_1 = NULL;
   11995           0 :   int __pyx_t_2;
   11996           0 :   PyObject *__pyx_t_3 = NULL;
   11997           0 :   Py_ssize_t __pyx_t_4;
   11998           0 :   Py_ssize_t __pyx_t_5;
   11999           0 :   Py_UCS4 __pyx_t_6;
   12000           0 :   PyObject *__pyx_t_7 = NULL;
   12001           0 :   int __pyx_lineno = 0;
   12002           0 :   const char *__pyx_filename = NULL;
   12003           0 :   int __pyx_clineno = 0;
   12004           0 :   __Pyx_RefNannySetupContext("_unellipsify", 1);
   12005             : 
   12006             :   /* "View.MemoryView":677
   12007             :  *     """
   12008             :  *     cdef Py_ssize_t idx
   12009             :  *     tup = <tuple>index if isinstance(index, tuple) else (index,)             # <<<<<<<<<<<<<<
   12010             :  * 
   12011             :  *     result = [slice(None)] * ndim
   12012             :  */
   12013           0 :   __pyx_t_2 = PyTuple_Check(__pyx_v_index); 
   12014           0 :   if (__pyx_t_2) {
   12015           0 :     __Pyx_INCREF(((PyObject*)__pyx_v_index));
   12016             :     __pyx_t_1 = __pyx_v_index;
   12017             :   } else {
   12018           0 :     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 677, __pyx_L1_error)
   12019           0 :     __Pyx_GOTREF(__pyx_t_3);
   12020           0 :     __Pyx_INCREF(__pyx_v_index);
   12021           0 :     __Pyx_GIVEREF(__pyx_v_index);
   12022           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index)) __PYX_ERR(1, 677, __pyx_L1_error);
   12023           0 :     __pyx_t_1 = __pyx_t_3;
   12024           0 :     __pyx_t_3 = 0;
   12025             :   }
   12026           0 :   __pyx_v_tup = ((PyObject*)__pyx_t_1);
   12027           0 :   __pyx_t_1 = 0;
   12028             : 
   12029             :   /* "View.MemoryView":679
   12030             :  *     tup = <tuple>index if isinstance(index, tuple) else (index,)
   12031             :  * 
   12032             :  *     result = [slice(None)] * ndim             # <<<<<<<<<<<<<<
   12033             :  *     have_slices = False
   12034             :  *     seen_ellipsis = False
   12035             :  */
   12036           0 :   __pyx_t_1 = PyList_New(1 * ((__pyx_v_ndim<0) ? 0:__pyx_v_ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 679, __pyx_L1_error)
   12037             :   __Pyx_GOTREF(__pyx_t_1);
   12038             :   { Py_ssize_t __pyx_temp;
   12039           0 :     for (__pyx_temp=0; __pyx_temp < __pyx_v_ndim; __pyx_temp++) {
   12040           0 :       __Pyx_INCREF(__pyx_slice__5);
   12041           0 :       __Pyx_GIVEREF(__pyx_slice__5);
   12042           0 :       if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_slice__5)) __PYX_ERR(1, 679, __pyx_L1_error);
   12043             :     }
   12044             :   }
   12045           0 :   __pyx_v_result = ((PyObject*)__pyx_t_1);
   12046           0 :   __pyx_t_1 = 0;
   12047             : 
   12048             :   /* "View.MemoryView":680
   12049             :  * 
   12050             :  *     result = [slice(None)] * ndim
   12051             :  *     have_slices = False             # <<<<<<<<<<<<<<
   12052             :  *     seen_ellipsis = False
   12053             :  *     idx = 0
   12054             :  */
   12055           0 :   __pyx_v_have_slices = 0;
   12056             : 
   12057             :   /* "View.MemoryView":681
   12058             :  *     result = [slice(None)] * ndim
   12059             :  *     have_slices = False
   12060             :  *     seen_ellipsis = False             # <<<<<<<<<<<<<<
   12061             :  *     idx = 0
   12062             :  *     for item in tup:
   12063             :  */
   12064           0 :   __pyx_v_seen_ellipsis = 0;
   12065             : 
   12066             :   /* "View.MemoryView":682
   12067             :  *     have_slices = False
   12068             :  *     seen_ellipsis = False
   12069             :  *     idx = 0             # <<<<<<<<<<<<<<
   12070             :  *     for item in tup:
   12071             :  *         if item is Ellipsis:
   12072             :  */
   12073           0 :   __pyx_v_idx = 0;
   12074             : 
   12075             :   /* "View.MemoryView":683
   12076             :  *     seen_ellipsis = False
   12077             :  *     idx = 0
   12078             :  *     for item in tup:             # <<<<<<<<<<<<<<
   12079             :  *         if item is Ellipsis:
   12080             :  *             if not seen_ellipsis:
   12081             :  */
   12082           0 :   if (unlikely(__pyx_v_tup == Py_None)) {
   12083           0 :     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
   12084           0 :     __PYX_ERR(1, 683, __pyx_L1_error)
   12085             :   }
   12086           0 :   __pyx_t_1 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_1);
   12087             :   __pyx_t_4 = 0;
   12088           0 :   for (;;) {
   12089           0 :     {
   12090           0 :       Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
   12091             :       #if !CYTHON_ASSUME_SAFE_MACROS
   12092             :       if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 683, __pyx_L1_error)
   12093             :       #endif
   12094           0 :       if (__pyx_t_4 >= __pyx_temp) break;
   12095             :     }
   12096             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   12097           0 :     __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(1, 683, __pyx_L1_error)
   12098             :     #else
   12099             :     __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 683, __pyx_L1_error)
   12100             :     __Pyx_GOTREF(__pyx_t_3);
   12101             :     #endif
   12102           0 :     __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3);
   12103           0 :     __pyx_t_3 = 0;
   12104             : 
   12105             :     /* "View.MemoryView":684
   12106             :  *     idx = 0
   12107             :  *     for item in tup:
   12108             :  *         if item is Ellipsis:             # <<<<<<<<<<<<<<
   12109             :  *             if not seen_ellipsis:
   12110             :  *                 idx += ndim - len(tup)
   12111             :  */
   12112           0 :     __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
   12113           0 :     if (__pyx_t_2) {
   12114             : 
   12115             :       /* "View.MemoryView":685
   12116             :  *     for item in tup:
   12117             :  *         if item is Ellipsis:
   12118             :  *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
   12119             :  *                 idx += ndim - len(tup)
   12120             :  *                 seen_ellipsis = True
   12121             :  */
   12122           0 :       __pyx_t_2 = (!__pyx_v_seen_ellipsis);
   12123           0 :       if (__pyx_t_2) {
   12124             : 
   12125             :         /* "View.MemoryView":686
   12126             :  *         if item is Ellipsis:
   12127             :  *             if not seen_ellipsis:
   12128             :  *                 idx += ndim - len(tup)             # <<<<<<<<<<<<<<
   12129             :  *                 seen_ellipsis = True
   12130             :  *             have_slices = True
   12131             :  */
   12132           0 :         if (unlikely(__pyx_v_tup == Py_None)) {
   12133             :           PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
   12134             :           __PYX_ERR(1, 686, __pyx_L1_error)
   12135             :         }
   12136           0 :         __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(__pyx_v_tup); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 686, __pyx_L1_error)
   12137           0 :         __pyx_v_idx = (__pyx_v_idx + (__pyx_v_ndim - __pyx_t_5));
   12138             : 
   12139             :         /* "View.MemoryView":687
   12140             :  *             if not seen_ellipsis:
   12141             :  *                 idx += ndim - len(tup)
   12142             :  *                 seen_ellipsis = True             # <<<<<<<<<<<<<<
   12143             :  *             have_slices = True
   12144             :  *         else:
   12145             :  */
   12146           0 :         __pyx_v_seen_ellipsis = 1;
   12147             : 
   12148             :         /* "View.MemoryView":685
   12149             :  *     for item in tup:
   12150             :  *         if item is Ellipsis:
   12151             :  *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
   12152             :  *                 idx += ndim - len(tup)
   12153             :  *                 seen_ellipsis = True
   12154             :  */
   12155             :       }
   12156             : 
   12157             :       /* "View.MemoryView":688
   12158             :  *                 idx += ndim - len(tup)
   12159             :  *                 seen_ellipsis = True
   12160             :  *             have_slices = True             # <<<<<<<<<<<<<<
   12161             :  *         else:
   12162             :  *             if isinstance(item, slice):
   12163             :  */
   12164           0 :       __pyx_v_have_slices = 1;
   12165             : 
   12166             :       /* "View.MemoryView":684
   12167             :  *     idx = 0
   12168             :  *     for item in tup:
   12169             :  *         if item is Ellipsis:             # <<<<<<<<<<<<<<
   12170             :  *             if not seen_ellipsis:
   12171             :  *                 idx += ndim - len(tup)
   12172             :  */
   12173           0 :       goto __pyx_L5;
   12174             :     }
   12175             : 
   12176             :     /* "View.MemoryView":690
   12177             :  *             have_slices = True
   12178             :  *         else:
   12179             :  *             if isinstance(item, slice):             # <<<<<<<<<<<<<<
   12180             :  *                 have_slices = True
   12181             :  *             elif not PyIndex_Check(item):
   12182             :  */
   12183             :     /*else*/ {
   12184           0 :       __pyx_t_2 = PySlice_Check(__pyx_v_item); 
   12185           0 :       if (__pyx_t_2) {
   12186             : 
   12187             :         /* "View.MemoryView":691
   12188             :  *         else:
   12189             :  *             if isinstance(item, slice):
   12190             :  *                 have_slices = True             # <<<<<<<<<<<<<<
   12191             :  *             elif not PyIndex_Check(item):
   12192             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"
   12193             :  */
   12194           0 :         __pyx_v_have_slices = 1;
   12195             : 
   12196             :         /* "View.MemoryView":690
   12197             :  *             have_slices = True
   12198             :  *         else:
   12199             :  *             if isinstance(item, slice):             # <<<<<<<<<<<<<<
   12200             :  *                 have_slices = True
   12201             :  *             elif not PyIndex_Check(item):
   12202             :  */
   12203           0 :         goto __pyx_L7;
   12204             :       }
   12205             : 
   12206             :       /* "View.MemoryView":692
   12207             :  *             if isinstance(item, slice):
   12208             :  *                 have_slices = True
   12209             :  *             elif not PyIndex_Check(item):             # <<<<<<<<<<<<<<
   12210             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"
   12211             :  *             result[idx] = item
   12212             :  */
   12213           0 :       __pyx_t_2 = (!(PyIndex_Check(__pyx_v_item) != 0));
   12214           0 :       if (unlikely(__pyx_t_2)) {
   12215             : 
   12216             :         /* "View.MemoryView":693
   12217             :  *                 have_slices = True
   12218             :  *             elif not PyIndex_Check(item):
   12219             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"             # <<<<<<<<<<<<<<
   12220             :  *             result[idx] = item
   12221             :  *         idx += 1
   12222             :  */
   12223           0 :         __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 693, __pyx_L1_error)
   12224           0 :         __Pyx_GOTREF(__pyx_t_3);
   12225           0 :         __pyx_t_5 = 0;
   12226           0 :         __pyx_t_6 = 127;
   12227           0 :         __Pyx_INCREF(__pyx_kp_u_Cannot_index_with_type);
   12228           0 :         __pyx_t_5 += 24;
   12229           0 :         __Pyx_GIVEREF(__pyx_kp_u_Cannot_index_with_type);
   12230           0 :         PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Cannot_index_with_type);
   12231           0 :         __pyx_t_7 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_item)), __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 693, __pyx_L1_error)
   12232           0 :         __Pyx_GOTREF(__pyx_t_7);
   12233           0 :         __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_6;
   12234           0 :         __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
   12235           0 :         __Pyx_GIVEREF(__pyx_t_7);
   12236           0 :         PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7);
   12237           0 :         __pyx_t_7 = 0;
   12238           0 :         __Pyx_INCREF(__pyx_kp_u__6);
   12239           0 :         __pyx_t_5 += 1;
   12240           0 :         __Pyx_GIVEREF(__pyx_kp_u__6);
   12241           0 :         PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__6);
   12242           0 :         __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 693, __pyx_L1_error)
   12243           0 :         __Pyx_GOTREF(__pyx_t_7);
   12244           0 :         __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   12245           0 :         __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_7, 0, 0);
   12246           0 :         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   12247           0 :         __PYX_ERR(1, 693, __pyx_L1_error)
   12248             : 
   12249             :         /* "View.MemoryView":692
   12250             :  *             if isinstance(item, slice):
   12251             :  *                 have_slices = True
   12252             :  *             elif not PyIndex_Check(item):             # <<<<<<<<<<<<<<
   12253             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"
   12254             :  *             result[idx] = item
   12255             :  */
   12256             :       }
   12257           0 :       __pyx_L7:;
   12258             : 
   12259             :       /* "View.MemoryView":694
   12260             :  *             elif not PyIndex_Check(item):
   12261             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"
   12262             :  *             result[idx] = item             # <<<<<<<<<<<<<<
   12263             :  *         idx += 1
   12264             :  * 
   12265             :  */
   12266           0 :       if (unlikely((__Pyx_SetItemInt(__pyx_v_result, __pyx_v_idx, __pyx_v_item, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0))) __PYX_ERR(1, 694, __pyx_L1_error)
   12267             :     }
   12268           0 :     __pyx_L5:;
   12269             : 
   12270             :     /* "View.MemoryView":695
   12271             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"
   12272             :  *             result[idx] = item
   12273             :  *         idx += 1             # <<<<<<<<<<<<<<
   12274             :  * 
   12275             :  *     nslices = ndim - idx
   12276             :  */
   12277           0 :     __pyx_v_idx = (__pyx_v_idx + 1);
   12278             : 
   12279             :     /* "View.MemoryView":683
   12280             :  *     seen_ellipsis = False
   12281             :  *     idx = 0
   12282             :  *     for item in tup:             # <<<<<<<<<<<<<<
   12283             :  *         if item is Ellipsis:
   12284             :  *             if not seen_ellipsis:
   12285             :  */
   12286             :   }
   12287           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   12288             : 
   12289             :   /* "View.MemoryView":697
   12290             :  *         idx += 1
   12291             :  * 
   12292             :  *     nslices = ndim - idx             # <<<<<<<<<<<<<<
   12293             :  *     return have_slices or nslices, tuple(result)
   12294             :  * 
   12295             :  */
   12296           0 :   __pyx_v_nslices = (__pyx_v_ndim - __pyx_v_idx);
   12297             : 
   12298             :   /* "View.MemoryView":698
   12299             :  * 
   12300             :  *     nslices = ndim - idx
   12301             :  *     return have_slices or nslices, tuple(result)             # <<<<<<<<<<<<<<
   12302             :  * 
   12303             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
   12304             :  */
   12305           0 :   __Pyx_XDECREF(__pyx_r);
   12306           0 :   if (!__pyx_v_have_slices) {
   12307           0 :   } else {
   12308           0 :     __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error)
   12309           0 :     __Pyx_GOTREF(__pyx_t_7);
   12310           0 :     __pyx_t_1 = __pyx_t_7;
   12311           0 :     __pyx_t_7 = 0;
   12312           0 :     goto __pyx_L9_bool_binop_done;
   12313             :   }
   12314           0 :   __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error)
   12315             :   __Pyx_GOTREF(__pyx_t_7);
   12316             :   __pyx_t_1 = __pyx_t_7;
   12317           0 :   __pyx_t_7 = 0;
   12318           0 :   __pyx_L9_bool_binop_done:;
   12319           0 :   __pyx_t_7 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error)
   12320           0 :   __Pyx_GOTREF(__pyx_t_7);
   12321           0 :   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 698, __pyx_L1_error)
   12322           0 :   __Pyx_GOTREF(__pyx_t_3);
   12323           0 :   __Pyx_GIVEREF(__pyx_t_1);
   12324           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(1, 698, __pyx_L1_error);
   12325           0 :   __Pyx_GIVEREF(__pyx_t_7);
   12326           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error);
   12327           0 :   __pyx_t_1 = 0;
   12328           0 :   __pyx_t_7 = 0;
   12329           0 :   __pyx_r = ((PyObject*)__pyx_t_3);
   12330           0 :   __pyx_t_3 = 0;
   12331           0 :   goto __pyx_L0;
   12332             : 
   12333             :   /* "View.MemoryView":671
   12334             :  *     return isinstance(o, memoryview)
   12335             :  * 
   12336             :  * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
   12337             :  *     """
   12338             :  *     Replace all ellipses with full slices and fill incomplete indices with
   12339             :  */
   12340             : 
   12341             :   /* function exit code */
   12342           0 :   __pyx_L1_error:;
   12343           0 :   __Pyx_XDECREF(__pyx_t_1);
   12344           0 :   __Pyx_XDECREF(__pyx_t_3);
   12345           0 :   __Pyx_XDECREF(__pyx_t_7);
   12346           0 :   __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
   12347           0 :   __pyx_r = 0;
   12348           0 :   __pyx_L0:;
   12349           0 :   __Pyx_XDECREF(__pyx_v_tup);
   12350           0 :   __Pyx_XDECREF(__pyx_v_result);
   12351           0 :   __Pyx_XDECREF(__pyx_v_item);
   12352           0 :   __Pyx_XGIVEREF(__pyx_r);
   12353           0 :   __Pyx_RefNannyFinishContext();
   12354           0 :   return __pyx_r;
   12355             : }
   12356             : 
   12357             : /* "View.MemoryView":700
   12358             :  *     return have_slices or nslices, tuple(result)
   12359             :  * 
   12360             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:             # <<<<<<<<<<<<<<
   12361             :  *     for suboffset in suboffsets[:ndim]:
   12362             :  *         if suboffset >= 0:
   12363             :  */
   12364             : 
   12365           0 : static int assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
   12366           0 :   Py_ssize_t __pyx_v_suboffset;
   12367           0 :   int __pyx_r;
   12368           0 :   Py_ssize_t *__pyx_t_1;
   12369           0 :   Py_ssize_t *__pyx_t_2;
   12370           0 :   Py_ssize_t *__pyx_t_3;
   12371           0 :   int __pyx_t_4;
   12372           0 :   int __pyx_lineno = 0;
   12373           0 :   const char *__pyx_filename = NULL;
   12374           0 :   int __pyx_clineno = 0;
   12375             : 
   12376             :   /* "View.MemoryView":701
   12377             :  * 
   12378             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
   12379             :  *     for suboffset in suboffsets[:ndim]:             # <<<<<<<<<<<<<<
   12380             :  *         if suboffset >= 0:
   12381             :  *             raise ValueError, "Indirect dimensions not supported"
   12382             :  */
   12383           0 :   __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
   12384           0 :   for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
   12385           0 :     __pyx_t_1 = __pyx_t_3;
   12386           0 :     __pyx_v_suboffset = (__pyx_t_1[0]);
   12387             : 
   12388             :     /* "View.MemoryView":702
   12389             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
   12390             :  *     for suboffset in suboffsets[:ndim]:
   12391             :  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
   12392             :  *             raise ValueError, "Indirect dimensions not supported"
   12393             :  *     return 0  # return type just used as an error flag
   12394             :  */
   12395           0 :     __pyx_t_4 = (__pyx_v_suboffset >= 0);
   12396           0 :     if (unlikely(__pyx_t_4)) {
   12397             : 
   12398             :       /* "View.MemoryView":703
   12399             :  *     for suboffset in suboffsets[:ndim]:
   12400             :  *         if suboffset >= 0:
   12401             :  *             raise ValueError, "Indirect dimensions not supported"             # <<<<<<<<<<<<<<
   12402             :  *     return 0  # return type just used as an error flag
   12403             :  * 
   12404             :  */
   12405           0 :       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Indirect_dimensions_not_supporte, 0, 0);
   12406           0 :       __PYX_ERR(1, 703, __pyx_L1_error)
   12407             : 
   12408             :       /* "View.MemoryView":702
   12409             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
   12410             :  *     for suboffset in suboffsets[:ndim]:
   12411             :  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
   12412             :  *             raise ValueError, "Indirect dimensions not supported"
   12413             :  *     return 0  # return type just used as an error flag
   12414             :  */
   12415             :     }
   12416             :   }
   12417             : 
   12418             :   /* "View.MemoryView":704
   12419             :  *         if suboffset >= 0:
   12420             :  *             raise ValueError, "Indirect dimensions not supported"
   12421             :  *     return 0  # return type just used as an error flag             # <<<<<<<<<<<<<<
   12422             :  * 
   12423             :  * 
   12424             :  */
   12425           0 :   __pyx_r = 0;
   12426           0 :   goto __pyx_L0;
   12427             : 
   12428             :   /* "View.MemoryView":700
   12429             :  *     return have_slices or nslices, tuple(result)
   12430             :  * 
   12431             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:             # <<<<<<<<<<<<<<
   12432             :  *     for suboffset in suboffsets[:ndim]:
   12433             :  *         if suboffset >= 0:
   12434             :  */
   12435             : 
   12436             :   /* function exit code */
   12437           0 :   __pyx_L1_error:;
   12438           0 :   __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
   12439           0 :   __pyx_r = -1;
   12440           0 :   __pyx_L0:;
   12441           0 :   return __pyx_r;
   12442             : }
   12443             : 
   12444             : /* "View.MemoryView":711
   12445             :  * 
   12446             :  * @cname('__pyx_memview_slice')
   12447             :  * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
   12448             :  *     cdef int new_ndim = 0, suboffset_dim = -1, dim
   12449             :  *     cdef bint negative_step
   12450             :  */
   12451             : 
   12452           0 : static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
   12453           0 :   int __pyx_v_new_ndim;
   12454           0 :   int __pyx_v_suboffset_dim;
   12455           0 :   int __pyx_v_dim;
   12456           0 :   __Pyx_memviewslice __pyx_v_src;
   12457           0 :   __Pyx_memviewslice __pyx_v_dst;
   12458           0 :   __Pyx_memviewslice *__pyx_v_p_src;
   12459           0 :   struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
   12460           0 :   __Pyx_memviewslice *__pyx_v_p_dst;
   12461           0 :   int *__pyx_v_p_suboffset_dim;
   12462           0 :   Py_ssize_t __pyx_v_start;
   12463           0 :   Py_ssize_t __pyx_v_stop;
   12464           0 :   Py_ssize_t __pyx_v_step;
   12465           0 :   Py_ssize_t __pyx_v_cindex;
   12466           0 :   int __pyx_v_have_start;
   12467           0 :   int __pyx_v_have_stop;
   12468           0 :   int __pyx_v_have_step;
   12469           0 :   PyObject *__pyx_v_index = NULL;
   12470           0 :   struct __pyx_memoryview_obj *__pyx_r = NULL;
   12471             :   __Pyx_RefNannyDeclarations
   12472           0 :   int __pyx_t_1;
   12473           0 :   PyObject *__pyx_t_2 = NULL;
   12474           0 :   struct __pyx_memoryview_obj *__pyx_t_3;
   12475           0 :   char *__pyx_t_4;
   12476           0 :   int __pyx_t_5;
   12477           0 :   Py_ssize_t __pyx_t_6;
   12478           0 :   PyObject *(*__pyx_t_7)(PyObject *);
   12479           0 :   PyObject *__pyx_t_8 = NULL;
   12480           0 :   Py_ssize_t __pyx_t_9;
   12481           0 :   int __pyx_t_10;
   12482           0 :   Py_ssize_t __pyx_t_11;
   12483           0 :   int __pyx_lineno = 0;
   12484           0 :   const char *__pyx_filename = NULL;
   12485           0 :   int __pyx_clineno = 0;
   12486           0 :   __Pyx_RefNannySetupContext("memview_slice", 1);
   12487             : 
   12488             :   /* "View.MemoryView":712
   12489             :  * @cname('__pyx_memview_slice')
   12490             :  * cdef memoryview memview_slice(memoryview memview, object indices):
   12491             :  *     cdef int new_ndim = 0, suboffset_dim = -1, dim             # <<<<<<<<<<<<<<
   12492             :  *     cdef bint negative_step
   12493             :  *     cdef __Pyx_memviewslice src, dst
   12494             :  */
   12495           0 :   __pyx_v_new_ndim = 0;
   12496           0 :   __pyx_v_suboffset_dim = -1;
   12497             : 
   12498             :   /* "View.MemoryView":719
   12499             :  * 
   12500             :  * 
   12501             :  *     memset(&dst, 0, sizeof(dst))             # <<<<<<<<<<<<<<
   12502             :  * 
   12503             :  *     cdef _memoryviewslice memviewsliceobj
   12504             :  */
   12505           0 :   (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));
   12506             : 
   12507             :   /* "View.MemoryView":723
   12508             :  *     cdef _memoryviewslice memviewsliceobj
   12509             :  * 
   12510             :  *     assert memview.view.ndim > 0             # <<<<<<<<<<<<<<
   12511             :  * 
   12512             :  *     if isinstance(memview, _memoryviewslice):
   12513             :  */
   12514             :   #ifndef CYTHON_WITHOUT_ASSERTIONS
   12515           0 :   if (unlikely(__pyx_assertions_enabled())) {
   12516           0 :     __pyx_t_1 = (__pyx_v_memview->view.ndim > 0);
   12517           0 :     if (unlikely(!__pyx_t_1)) {
   12518           0 :       __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
   12519           0 :       __PYX_ERR(1, 723, __pyx_L1_error)
   12520             :     }
   12521             :   }
   12522             :   #else
   12523             :   if ((1)); else __PYX_ERR(1, 723, __pyx_L1_error)
   12524             :   #endif
   12525             : 
   12526             :   /* "View.MemoryView":725
   12527             :  *     assert memview.view.ndim > 0
   12528             :  * 
   12529             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   12530             :  *         memviewsliceobj = memview
   12531             :  *         p_src = &memviewsliceobj.from_slice
   12532             :  */
   12533           0 :   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
   12534           0 :   if (__pyx_t_1) {
   12535             : 
   12536             :     /* "View.MemoryView":726
   12537             :  * 
   12538             :  *     if isinstance(memview, _memoryviewslice):
   12539             :  *         memviewsliceobj = memview             # <<<<<<<<<<<<<<
   12540             :  *         p_src = &memviewsliceobj.from_slice
   12541             :  *     else:
   12542             :  */
   12543           0 :     if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 726, __pyx_L1_error)
   12544           0 :     __pyx_t_2 = ((PyObject *)__pyx_v_memview);
   12545           0 :     __Pyx_INCREF(__pyx_t_2);
   12546           0 :     __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
   12547           0 :     __pyx_t_2 = 0;
   12548             : 
   12549             :     /* "View.MemoryView":727
   12550             :  *     if isinstance(memview, _memoryviewslice):
   12551             :  *         memviewsliceobj = memview
   12552             :  *         p_src = &memviewsliceobj.from_slice             # <<<<<<<<<<<<<<
   12553             :  *     else:
   12554             :  *         slice_copy(memview, &src)
   12555             :  */
   12556           0 :     __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);
   12557             : 
   12558             :     /* "View.MemoryView":725
   12559             :  *     assert memview.view.ndim > 0
   12560             :  * 
   12561             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   12562             :  *         memviewsliceobj = memview
   12563             :  *         p_src = &memviewsliceobj.from_slice
   12564             :  */
   12565           0 :     goto __pyx_L3;
   12566             :   }
   12567             : 
   12568             :   /* "View.MemoryView":729
   12569             :  *         p_src = &memviewsliceobj.from_slice
   12570             :  *     else:
   12571             :  *         slice_copy(memview, &src)             # <<<<<<<<<<<<<<
   12572             :  *         p_src = &src
   12573             :  * 
   12574             :  */
   12575             :   /*else*/ {
   12576           0 :     __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));
   12577             : 
   12578             :     /* "View.MemoryView":730
   12579             :  *     else:
   12580             :  *         slice_copy(memview, &src)
   12581             :  *         p_src = &src             # <<<<<<<<<<<<<<
   12582             :  * 
   12583             :  * 
   12584             :  */
   12585           0 :     __pyx_v_p_src = (&__pyx_v_src);
   12586             :   }
   12587           0 :   __pyx_L3:;
   12588             : 
   12589             :   /* "View.MemoryView":736
   12590             :  * 
   12591             :  * 
   12592             :  *     dst.memview = p_src.memview             # <<<<<<<<<<<<<<
   12593             :  *     dst.data = p_src.data
   12594             :  * 
   12595             :  */
   12596           0 :   __pyx_t_3 = __pyx_v_p_src->memview;
   12597           0 :   __pyx_v_dst.memview = __pyx_t_3;
   12598             : 
   12599             :   /* "View.MemoryView":737
   12600             :  * 
   12601             :  *     dst.memview = p_src.memview
   12602             :  *     dst.data = p_src.data             # <<<<<<<<<<<<<<
   12603             :  * 
   12604             :  * 
   12605             :  */
   12606           0 :   __pyx_t_4 = __pyx_v_p_src->data;
   12607           0 :   __pyx_v_dst.data = __pyx_t_4;
   12608             : 
   12609             :   /* "View.MemoryView":742
   12610             :  * 
   12611             :  * 
   12612             :  *     cdef __Pyx_memviewslice *p_dst = &dst             # <<<<<<<<<<<<<<
   12613             :  *     cdef int *p_suboffset_dim = &suboffset_dim
   12614             :  *     cdef Py_ssize_t start, stop, step, cindex
   12615             :  */
   12616           0 :   __pyx_v_p_dst = (&__pyx_v_dst);
   12617             : 
   12618             :   /* "View.MemoryView":743
   12619             :  * 
   12620             :  *     cdef __Pyx_memviewslice *p_dst = &dst
   12621             :  *     cdef int *p_suboffset_dim = &suboffset_dim             # <<<<<<<<<<<<<<
   12622             :  *     cdef Py_ssize_t start, stop, step, cindex
   12623             :  *     cdef bint have_start, have_stop, have_step
   12624             :  */
   12625           0 :   __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);
   12626             : 
   12627             :   /* "View.MemoryView":747
   12628             :  *     cdef bint have_start, have_stop, have_step
   12629             :  * 
   12630             :  *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
   12631             :  *         if PyIndex_Check(index):
   12632             :  *             cindex = index
   12633             :  */
   12634           0 :   __pyx_t_5 = 0;
   12635           0 :   if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
   12636           0 :     __pyx_t_2 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_2);
   12637           0 :     __pyx_t_6 = 0;
   12638           0 :     __pyx_t_7 = NULL;
   12639             :   } else {
   12640           0 :     __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 747, __pyx_L1_error)
   12641           0 :     __Pyx_GOTREF(__pyx_t_2);
   12642           0 :     __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 747, __pyx_L1_error)
   12643             :   }
   12644           0 :   for (;;) {
   12645           0 :     if (likely(!__pyx_t_7)) {
   12646           0 :       if (likely(PyList_CheckExact(__pyx_t_2))) {
   12647             :         {
   12648           0 :           Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
   12649             :           #if !CYTHON_ASSUME_SAFE_MACROS
   12650             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
   12651             :           #endif
   12652           0 :           if (__pyx_t_6 >= __pyx_temp) break;
   12653             :         }
   12654             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   12655           0 :         __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
   12656             :         #else
   12657             :         __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 747, __pyx_L1_error)
   12658             :         __Pyx_GOTREF(__pyx_t_8);
   12659             :         #endif
   12660             :       } else {
   12661             :         {
   12662           0 :           Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
   12663             :           #if !CYTHON_ASSUME_SAFE_MACROS
   12664             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
   12665             :           #endif
   12666           0 :           if (__pyx_t_6 >= __pyx_temp) break;
   12667             :         }
   12668             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   12669           0 :         __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
   12670             :         #else
   12671             :         __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 747, __pyx_L1_error)
   12672             :         __Pyx_GOTREF(__pyx_t_8);
   12673             :         #endif
   12674             :       }
   12675             :     } else {
   12676           0 :       __pyx_t_8 = __pyx_t_7(__pyx_t_2);
   12677           0 :       if (unlikely(!__pyx_t_8)) {
   12678           0 :         PyObject* exc_type = PyErr_Occurred();
   12679           0 :         if (exc_type) {
   12680           0 :           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
   12681           0 :           else __PYX_ERR(1, 747, __pyx_L1_error)
   12682             :         }
   12683             :         break;
   12684             :       }
   12685           0 :       __Pyx_GOTREF(__pyx_t_8);
   12686             :     }
   12687           0 :     __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_8);
   12688           0 :     __pyx_t_8 = 0;
   12689           0 :     __pyx_v_dim = __pyx_t_5;
   12690           0 :     __pyx_t_5 = (__pyx_t_5 + 1);
   12691             : 
   12692             :     /* "View.MemoryView":748
   12693             :  * 
   12694             :  *     for dim, index in enumerate(indices):
   12695             :  *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
   12696             :  *             cindex = index
   12697             :  *             slice_memviewslice(
   12698             :  */
   12699           0 :     __pyx_t_1 = (PyIndex_Check(__pyx_v_index) != 0);
   12700           0 :     if (__pyx_t_1) {
   12701             : 
   12702             :       /* "View.MemoryView":749
   12703             :  *     for dim, index in enumerate(indices):
   12704             :  *         if PyIndex_Check(index):
   12705             :  *             cindex = index             # <<<<<<<<<<<<<<
   12706             :  *             slice_memviewslice(
   12707             :  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
   12708             :  */
   12709           0 :       __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 749, __pyx_L1_error)
   12710           0 :       __pyx_v_cindex = __pyx_t_9;
   12711             : 
   12712             :       /* "View.MemoryView":750
   12713             :  *         if PyIndex_Check(index):
   12714             :  *             cindex = index
   12715             :  *             slice_memviewslice(             # <<<<<<<<<<<<<<
   12716             :  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
   12717             :  *                 dim, new_ndim, p_suboffset_dim,
   12718             :  */
   12719           0 :       __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_cindex, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 750, __pyx_L1_error)
   12720             : 
   12721             :       /* "View.MemoryView":748
   12722             :  * 
   12723             :  *     for dim, index in enumerate(indices):
   12724             :  *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
   12725             :  *             cindex = index
   12726             :  *             slice_memviewslice(
   12727             :  */
   12728           0 :       goto __pyx_L6;
   12729             :     }
   12730             : 
   12731             :     /* "View.MemoryView":756
   12732             :  *                 0, 0, 0, # have_{start,stop,step}
   12733             :  *                 False)
   12734             :  *         elif index is None:             # <<<<<<<<<<<<<<
   12735             :  *             p_dst.shape[new_ndim] = 1
   12736             :  *             p_dst.strides[new_ndim] = 0
   12737             :  */
   12738           0 :     __pyx_t_1 = (__pyx_v_index == Py_None);
   12739           0 :     if (__pyx_t_1) {
   12740             : 
   12741             :       /* "View.MemoryView":757
   12742             :  *                 False)
   12743             :  *         elif index is None:
   12744             :  *             p_dst.shape[new_ndim] = 1             # <<<<<<<<<<<<<<
   12745             :  *             p_dst.strides[new_ndim] = 0
   12746             :  *             p_dst.suboffsets[new_ndim] = -1
   12747             :  */
   12748           0 :       (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;
   12749             : 
   12750             :       /* "View.MemoryView":758
   12751             :  *         elif index is None:
   12752             :  *             p_dst.shape[new_ndim] = 1
   12753             :  *             p_dst.strides[new_ndim] = 0             # <<<<<<<<<<<<<<
   12754             :  *             p_dst.suboffsets[new_ndim] = -1
   12755             :  *             new_ndim += 1
   12756             :  */
   12757           0 :       (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;
   12758             : 
   12759             :       /* "View.MemoryView":759
   12760             :  *             p_dst.shape[new_ndim] = 1
   12761             :  *             p_dst.strides[new_ndim] = 0
   12762             :  *             p_dst.suboffsets[new_ndim] = -1             # <<<<<<<<<<<<<<
   12763             :  *             new_ndim += 1
   12764             :  *         else:
   12765             :  */
   12766           0 :       (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;
   12767             : 
   12768             :       /* "View.MemoryView":760
   12769             :  *             p_dst.strides[new_ndim] = 0
   12770             :  *             p_dst.suboffsets[new_ndim] = -1
   12771             :  *             new_ndim += 1             # <<<<<<<<<<<<<<
   12772             :  *         else:
   12773             :  *             start = index.start or 0
   12774             :  */
   12775           0 :       __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
   12776             : 
   12777             :       /* "View.MemoryView":756
   12778             :  *                 0, 0, 0, # have_{start,stop,step}
   12779             :  *                 False)
   12780             :  *         elif index is None:             # <<<<<<<<<<<<<<
   12781             :  *             p_dst.shape[new_ndim] = 1
   12782             :  *             p_dst.strides[new_ndim] = 0
   12783             :  */
   12784           0 :       goto __pyx_L6;
   12785             :     }
   12786             : 
   12787             :     /* "View.MemoryView":762
   12788             :  *             new_ndim += 1
   12789             :  *         else:
   12790             :  *             start = index.start or 0             # <<<<<<<<<<<<<<
   12791             :  *             stop = index.stop or 0
   12792             :  *             step = index.step or 0
   12793             :  */
   12794             :     /*else*/ {
   12795           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 762, __pyx_L1_error)
   12796           0 :       __Pyx_GOTREF(__pyx_t_8);
   12797           0 :       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 762, __pyx_L1_error)
   12798           0 :       if (!__pyx_t_1) {
   12799           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   12800             :       } else {
   12801           0 :         __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 762, __pyx_L1_error)
   12802           0 :         __pyx_t_9 = __pyx_t_11;
   12803           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   12804           0 :         goto __pyx_L7_bool_binop_done;
   12805             :       }
   12806             :       __pyx_t_9 = 0;
   12807           0 :       __pyx_L7_bool_binop_done:;
   12808           0 :       __pyx_v_start = __pyx_t_9;
   12809             : 
   12810             :       /* "View.MemoryView":763
   12811             :  *         else:
   12812             :  *             start = index.start or 0
   12813             :  *             stop = index.stop or 0             # <<<<<<<<<<<<<<
   12814             :  *             step = index.step or 0
   12815             :  * 
   12816             :  */
   12817           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 763, __pyx_L1_error)
   12818           0 :       __Pyx_GOTREF(__pyx_t_8);
   12819           0 :       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 763, __pyx_L1_error)
   12820           0 :       if (!__pyx_t_1) {
   12821           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   12822             :       } else {
   12823           0 :         __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 763, __pyx_L1_error)
   12824           0 :         __pyx_t_9 = __pyx_t_11;
   12825           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   12826           0 :         goto __pyx_L9_bool_binop_done;
   12827             :       }
   12828             :       __pyx_t_9 = 0;
   12829           0 :       __pyx_L9_bool_binop_done:;
   12830           0 :       __pyx_v_stop = __pyx_t_9;
   12831             : 
   12832             :       /* "View.MemoryView":764
   12833             :  *             start = index.start or 0
   12834             :  *             stop = index.stop or 0
   12835             :  *             step = index.step or 0             # <<<<<<<<<<<<<<
   12836             :  * 
   12837             :  *             have_start = index.start is not None
   12838             :  */
   12839           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 764, __pyx_L1_error)
   12840           0 :       __Pyx_GOTREF(__pyx_t_8);
   12841           0 :       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 764, __pyx_L1_error)
   12842           0 :       if (!__pyx_t_1) {
   12843           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   12844             :       } else {
   12845           0 :         __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 764, __pyx_L1_error)
   12846           0 :         __pyx_t_9 = __pyx_t_11;
   12847           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   12848           0 :         goto __pyx_L11_bool_binop_done;
   12849             :       }
   12850             :       __pyx_t_9 = 0;
   12851           0 :       __pyx_L11_bool_binop_done:;
   12852           0 :       __pyx_v_step = __pyx_t_9;
   12853             : 
   12854             :       /* "View.MemoryView":766
   12855             :  *             step = index.step or 0
   12856             :  * 
   12857             :  *             have_start = index.start is not None             # <<<<<<<<<<<<<<
   12858             :  *             have_stop = index.stop is not None
   12859             :  *             have_step = index.step is not None
   12860             :  */
   12861           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 766, __pyx_L1_error)
   12862           0 :       __Pyx_GOTREF(__pyx_t_8);
   12863           0 :       __pyx_t_1 = (__pyx_t_8 != Py_None);
   12864           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   12865           0 :       __pyx_v_have_start = __pyx_t_1;
   12866             : 
   12867             :       /* "View.MemoryView":767
   12868             :  * 
   12869             :  *             have_start = index.start is not None
   12870             :  *             have_stop = index.stop is not None             # <<<<<<<<<<<<<<
   12871             :  *             have_step = index.step is not None
   12872             :  * 
   12873             :  */
   12874           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 767, __pyx_L1_error)
   12875           0 :       __Pyx_GOTREF(__pyx_t_8);
   12876           0 :       __pyx_t_1 = (__pyx_t_8 != Py_None);
   12877           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   12878           0 :       __pyx_v_have_stop = __pyx_t_1;
   12879             : 
   12880             :       /* "View.MemoryView":768
   12881             :  *             have_start = index.start is not None
   12882             :  *             have_stop = index.stop is not None
   12883             :  *             have_step = index.step is not None             # <<<<<<<<<<<<<<
   12884             :  * 
   12885             :  *             slice_memviewslice(
   12886             :  */
   12887           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 768, __pyx_L1_error)
   12888           0 :       __Pyx_GOTREF(__pyx_t_8);
   12889           0 :       __pyx_t_1 = (__pyx_t_8 != Py_None);
   12890           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   12891           0 :       __pyx_v_have_step = __pyx_t_1;
   12892             : 
   12893             :       /* "View.MemoryView":770
   12894             :  *             have_step = index.step is not None
   12895             :  * 
   12896             :  *             slice_memviewslice(             # <<<<<<<<<<<<<<
   12897             :  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
   12898             :  *                 dim, new_ndim, p_suboffset_dim,
   12899             :  */
   12900           0 :       __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 770, __pyx_L1_error)
   12901             : 
   12902             :       /* "View.MemoryView":776
   12903             :  *                 have_start, have_stop, have_step,
   12904             :  *                 True)
   12905             :  *             new_ndim += 1             # <<<<<<<<<<<<<<
   12906             :  * 
   12907             :  *     if isinstance(memview, _memoryviewslice):
   12908             :  */
   12909           0 :       __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
   12910             :     }
   12911           0 :     __pyx_L6:;
   12912             : 
   12913             :     /* "View.MemoryView":747
   12914             :  *     cdef bint have_start, have_stop, have_step
   12915             :  * 
   12916             :  *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
   12917             :  *         if PyIndex_Check(index):
   12918             :  *             cindex = index
   12919             :  */
   12920             :   }
   12921           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   12922             : 
   12923             :   /* "View.MemoryView":778
   12924             :  *             new_ndim += 1
   12925             :  * 
   12926             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   12927             :  *         return memoryview_fromslice(dst, new_ndim,
   12928             :  *                                     memviewsliceobj.to_object_func,
   12929             :  */
   12930           0 :   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
   12931           0 :   if (__pyx_t_1) {
   12932             : 
   12933             :     /* "View.MemoryView":779
   12934             :  * 
   12935             :  *     if isinstance(memview, _memoryviewslice):
   12936             :  *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
   12937             :  *                                     memviewsliceobj.to_object_func,
   12938             :  *                                     memviewsliceobj.to_dtype_func,
   12939             :  */
   12940           0 :     __Pyx_XDECREF((PyObject *)__pyx_r);
   12941             : 
   12942             :     /* "View.MemoryView":780
   12943             :  *     if isinstance(memview, _memoryviewslice):
   12944             :  *         return memoryview_fromslice(dst, new_ndim,
   12945             :  *                                     memviewsliceobj.to_object_func,             # <<<<<<<<<<<<<<
   12946             :  *                                     memviewsliceobj.to_dtype_func,
   12947             :  *                                     memview.dtype_is_object)
   12948             :  */
   12949           0 :     if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 780, __pyx_L1_error) }
   12950             : 
   12951             :     /* "View.MemoryView":781
   12952             :  *         return memoryview_fromslice(dst, new_ndim,
   12953             :  *                                     memviewsliceobj.to_object_func,
   12954             :  *                                     memviewsliceobj.to_dtype_func,             # <<<<<<<<<<<<<<
   12955             :  *                                     memview.dtype_is_object)
   12956             :  *     else:
   12957             :  */
   12958           0 :     if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 781, __pyx_L1_error) }
   12959             : 
   12960             :     /* "View.MemoryView":779
   12961             :  * 
   12962             :  *     if isinstance(memview, _memoryviewslice):
   12963             :  *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
   12964             :  *                                     memviewsliceobj.to_object_func,
   12965             :  *                                     memviewsliceobj.to_dtype_func,
   12966             :  */
   12967           0 :     __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 779, __pyx_L1_error)
   12968           0 :     __Pyx_GOTREF(__pyx_t_2);
   12969           0 :     if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_memoryview_type))))) __PYX_ERR(1, 779, __pyx_L1_error)
   12970           0 :     __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2);
   12971           0 :     __pyx_t_2 = 0;
   12972           0 :     goto __pyx_L0;
   12973             : 
   12974             :     /* "View.MemoryView":778
   12975             :  *             new_ndim += 1
   12976             :  * 
   12977             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   12978             :  *         return memoryview_fromslice(dst, new_ndim,
   12979             :  *                                     memviewsliceobj.to_object_func,
   12980             :  */
   12981             :   }
   12982             : 
   12983             :   /* "View.MemoryView":784
   12984             :  *                                     memview.dtype_is_object)
   12985             :  *     else:
   12986             :  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
   12987             :  *                                     memview.dtype_is_object)
   12988             :  * 
   12989             :  */
   12990             :   /*else*/ {
   12991           0 :     __Pyx_XDECREF((PyObject *)__pyx_r);
   12992             : 
   12993             :     /* "View.MemoryView":785
   12994             :  *     else:
   12995             :  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,
   12996             :  *                                     memview.dtype_is_object)             # <<<<<<<<<<<<<<
   12997             :  * 
   12998             :  * 
   12999             :  */
   13000           0 :     __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 784, __pyx_L1_error)
   13001           0 :     __Pyx_GOTREF(__pyx_t_2);
   13002             : 
   13003             :     /* "View.MemoryView":784
   13004             :  *                                     memview.dtype_is_object)
   13005             :  *     else:
   13006             :  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
   13007             :  *                                     memview.dtype_is_object)
   13008             :  * 
   13009             :  */
   13010           0 :     if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_memoryview_type))))) __PYX_ERR(1, 784, __pyx_L1_error)
   13011           0 :     __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2);
   13012           0 :     __pyx_t_2 = 0;
   13013           0 :     goto __pyx_L0;
   13014             :   }
   13015             : 
   13016             :   /* "View.MemoryView":711
   13017             :  * 
   13018             :  * @cname('__pyx_memview_slice')
   13019             :  * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
   13020             :  *     cdef int new_ndim = 0, suboffset_dim = -1, dim
   13021             :  *     cdef bint negative_step
   13022             :  */
   13023             : 
   13024             :   /* function exit code */
   13025           0 :   __pyx_L1_error:;
   13026           0 :   __Pyx_XDECREF(__pyx_t_2);
   13027           0 :   __Pyx_XDECREF(__pyx_t_8);
   13028           0 :   __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
   13029           0 :   __pyx_r = 0;
   13030           0 :   __pyx_L0:;
   13031           0 :   __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
   13032           0 :   __Pyx_XDECREF(__pyx_v_index);
   13033           0 :   __Pyx_XGIVEREF((PyObject *)__pyx_r);
   13034           0 :   __Pyx_RefNannyFinishContext();
   13035           0 :   return __pyx_r;
   13036             : }
   13037             : 
   13038             : /* "View.MemoryView":793
   13039             :  * 
   13040             :  * @cname('__pyx_memoryview_slice_memviewslice')
   13041             :  * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
   13042             :  *         __Pyx_memviewslice *dst,
   13043             :  *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
   13044             :  */
   13045             : 
   13046           0 : static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) {
   13047           0 :   Py_ssize_t __pyx_v_new_shape;
   13048           0 :   int __pyx_v_negative_step;
   13049           0 :   int __pyx_r;
   13050           0 :   int __pyx_t_1;
   13051           0 :   int __pyx_t_2;
   13052           0 :   int __pyx_t_3;
   13053           0 :   int __pyx_lineno = 0;
   13054           0 :   const char *__pyx_filename = NULL;
   13055           0 :   int __pyx_clineno = 0;
   13056             :   #ifdef WITH_THREAD
   13057           0 :   PyGILState_STATE __pyx_gilstate_save;
   13058             :   #endif
   13059             : 
   13060             :   /* "View.MemoryView":813
   13061             :  *     cdef bint negative_step
   13062             :  * 
   13063             :  *     if not is_slice:             # <<<<<<<<<<<<<<
   13064             :  * 
   13065             :  *         if start < 0:
   13066             :  */
   13067           0 :   __pyx_t_1 = (!__pyx_v_is_slice);
   13068           0 :   if (__pyx_t_1) {
   13069             : 
   13070             :     /* "View.MemoryView":815
   13071             :  *     if not is_slice:
   13072             :  * 
   13073             :  *         if start < 0:             # <<<<<<<<<<<<<<
   13074             :  *             start += shape
   13075             :  *         if not 0 <= start < shape:
   13076             :  */
   13077           0 :     __pyx_t_1 = (__pyx_v_start < 0);
   13078           0 :     if (__pyx_t_1) {
   13079             : 
   13080             :       /* "View.MemoryView":816
   13081             :  * 
   13082             :  *         if start < 0:
   13083             :  *             start += shape             # <<<<<<<<<<<<<<
   13084             :  *         if not 0 <= start < shape:
   13085             :  *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
   13086             :  */
   13087           0 :       __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
   13088             : 
   13089             :       /* "View.MemoryView":815
   13090             :  *     if not is_slice:
   13091             :  * 
   13092             :  *         if start < 0:             # <<<<<<<<<<<<<<
   13093             :  *             start += shape
   13094             :  *         if not 0 <= start < shape:
   13095             :  */
   13096             :     }
   13097             : 
   13098             :     /* "View.MemoryView":817
   13099             :  *         if start < 0:
   13100             :  *             start += shape
   13101             :  *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
   13102             :  *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
   13103             :  *     else:
   13104             :  */
   13105           0 :     __pyx_t_1 = (0 <= __pyx_v_start);
   13106           0 :     if (__pyx_t_1) {
   13107           0 :       __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);
   13108             :     }
   13109           0 :     __pyx_t_2 = (!__pyx_t_1);
   13110           0 :     if (__pyx_t_2) {
   13111             : 
   13112             :       /* "View.MemoryView":818
   13113             :  *             start += shape
   13114             :  *         if not 0 <= start < shape:
   13115             :  *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)             # <<<<<<<<<<<<<<
   13116             :  *     else:
   13117             :  * 
   13118             :  */
   13119           0 :       __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_kp_s_Index_out_of_bounds_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 818, __pyx_L1_error)
   13120             : 
   13121             :       /* "View.MemoryView":817
   13122             :  *         if start < 0:
   13123             :  *             start += shape
   13124             :  *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
   13125             :  *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
   13126             :  *     else:
   13127             :  */
   13128             :     }
   13129             : 
   13130             :     /* "View.MemoryView":813
   13131             :  *     cdef bint negative_step
   13132             :  * 
   13133             :  *     if not is_slice:             # <<<<<<<<<<<<<<
   13134             :  * 
   13135             :  *         if start < 0:
   13136             :  */
   13137           0 :     goto __pyx_L3;
   13138             :   }
   13139             : 
   13140             :   /* "View.MemoryView":821
   13141             :  *     else:
   13142             :  * 
   13143             :  *         if have_step:             # <<<<<<<<<<<<<<
   13144             :  *             negative_step = step < 0
   13145             :  *             if step == 0:
   13146             :  */
   13147             :   /*else*/ {
   13148           0 :     __pyx_t_2 = (__pyx_v_have_step != 0);
   13149           0 :     if (__pyx_t_2) {
   13150             : 
   13151             :       /* "View.MemoryView":822
   13152             :  * 
   13153             :  *         if have_step:
   13154             :  *             negative_step = step < 0             # <<<<<<<<<<<<<<
   13155             :  *             if step == 0:
   13156             :  *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
   13157             :  */
   13158           0 :       __pyx_v_negative_step = (__pyx_v_step < 0);
   13159             : 
   13160             :       /* "View.MemoryView":823
   13161             :  *         if have_step:
   13162             :  *             negative_step = step < 0
   13163             :  *             if step == 0:             # <<<<<<<<<<<<<<
   13164             :  *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
   13165             :  *         else:
   13166             :  */
   13167           0 :       __pyx_t_2 = (__pyx_v_step == 0);
   13168           0 :       if (__pyx_t_2) {
   13169             : 
   13170             :         /* "View.MemoryView":824
   13171             :  *             negative_step = step < 0
   13172             :  *             if step == 0:
   13173             :  *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)             # <<<<<<<<<<<<<<
   13174             :  *         else:
   13175             :  *             negative_step = False
   13176             :  */
   13177           0 :         __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_kp_s_Step_may_not_be_zero_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 824, __pyx_L1_error)
   13178             : 
   13179             :         /* "View.MemoryView":823
   13180             :  *         if have_step:
   13181             :  *             negative_step = step < 0
   13182             :  *             if step == 0:             # <<<<<<<<<<<<<<
   13183             :  *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
   13184             :  *         else:
   13185             :  */
   13186             :       }
   13187             : 
   13188             :       /* "View.MemoryView":821
   13189             :  *     else:
   13190             :  * 
   13191             :  *         if have_step:             # <<<<<<<<<<<<<<
   13192             :  *             negative_step = step < 0
   13193             :  *             if step == 0:
   13194             :  */
   13195           0 :       goto __pyx_L6;
   13196             :     }
   13197             : 
   13198             :     /* "View.MemoryView":826
   13199             :  *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
   13200             :  *         else:
   13201             :  *             negative_step = False             # <<<<<<<<<<<<<<
   13202             :  *             step = 1
   13203             :  * 
   13204             :  */
   13205             :     /*else*/ {
   13206             :       __pyx_v_negative_step = 0;
   13207             : 
   13208             :       /* "View.MemoryView":827
   13209             :  *         else:
   13210             :  *             negative_step = False
   13211             :  *             step = 1             # <<<<<<<<<<<<<<
   13212             :  * 
   13213             :  * 
   13214             :  */
   13215             :       __pyx_v_step = 1;
   13216             :     }
   13217           0 :     __pyx_L6:;
   13218             : 
   13219             :     /* "View.MemoryView":830
   13220             :  * 
   13221             :  * 
   13222             :  *         if have_start:             # <<<<<<<<<<<<<<
   13223             :  *             if start < 0:
   13224             :  *                 start += shape
   13225             :  */
   13226           0 :     __pyx_t_2 = (__pyx_v_have_start != 0);
   13227           0 :     if (__pyx_t_2) {
   13228             : 
   13229             :       /* "View.MemoryView":831
   13230             :  * 
   13231             :  *         if have_start:
   13232             :  *             if start < 0:             # <<<<<<<<<<<<<<
   13233             :  *                 start += shape
   13234             :  *                 if start < 0:
   13235             :  */
   13236           0 :       __pyx_t_2 = (__pyx_v_start < 0);
   13237           0 :       if (__pyx_t_2) {
   13238             : 
   13239             :         /* "View.MemoryView":832
   13240             :  *         if have_start:
   13241             :  *             if start < 0:
   13242             :  *                 start += shape             # <<<<<<<<<<<<<<
   13243             :  *                 if start < 0:
   13244             :  *                     start = 0
   13245             :  */
   13246           0 :         __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
   13247             : 
   13248             :         /* "View.MemoryView":833
   13249             :  *             if start < 0:
   13250             :  *                 start += shape
   13251             :  *                 if start < 0:             # <<<<<<<<<<<<<<
   13252             :  *                     start = 0
   13253             :  *             elif start >= shape:
   13254             :  */
   13255           0 :         __pyx_t_2 = (__pyx_v_start < 0);
   13256           0 :         if (__pyx_t_2) {
   13257             : 
   13258             :           /* "View.MemoryView":834
   13259             :  *                 start += shape
   13260             :  *                 if start < 0:
   13261             :  *                     start = 0             # <<<<<<<<<<<<<<
   13262             :  *             elif start >= shape:
   13263             :  *                 if negative_step:
   13264             :  */
   13265             :           __pyx_v_start = 0;
   13266             : 
   13267             :           /* "View.MemoryView":833
   13268             :  *             if start < 0:
   13269             :  *                 start += shape
   13270             :  *                 if start < 0:             # <<<<<<<<<<<<<<
   13271             :  *                     start = 0
   13272             :  *             elif start >= shape:
   13273             :  */
   13274             :         }
   13275             : 
   13276             :         /* "View.MemoryView":831
   13277             :  * 
   13278             :  *         if have_start:
   13279             :  *             if start < 0:             # <<<<<<<<<<<<<<
   13280             :  *                 start += shape
   13281             :  *                 if start < 0:
   13282             :  */
   13283           0 :         goto __pyx_L9;
   13284             :       }
   13285             : 
   13286             :       /* "View.MemoryView":835
   13287             :  *                 if start < 0:
   13288             :  *                     start = 0
   13289             :  *             elif start >= shape:             # <<<<<<<<<<<<<<
   13290             :  *                 if negative_step:
   13291             :  *                     start = shape - 1
   13292             :  */
   13293           0 :       __pyx_t_2 = (__pyx_v_start >= __pyx_v_shape);
   13294           0 :       if (__pyx_t_2) {
   13295             : 
   13296             :         /* "View.MemoryView":836
   13297             :  *                     start = 0
   13298             :  *             elif start >= shape:
   13299             :  *                 if negative_step:             # <<<<<<<<<<<<<<
   13300             :  *                     start = shape - 1
   13301             :  *                 else:
   13302             :  */
   13303           0 :         if (__pyx_v_negative_step) {
   13304             : 
   13305             :           /* "View.MemoryView":837
   13306             :  *             elif start >= shape:
   13307             :  *                 if negative_step:
   13308             :  *                     start = shape - 1             # <<<<<<<<<<<<<<
   13309             :  *                 else:
   13310             :  *                     start = shape
   13311             :  */
   13312           0 :           __pyx_v_start = (__pyx_v_shape - 1);
   13313             : 
   13314             :           /* "View.MemoryView":836
   13315             :  *                     start = 0
   13316             :  *             elif start >= shape:
   13317             :  *                 if negative_step:             # <<<<<<<<<<<<<<
   13318             :  *                     start = shape - 1
   13319             :  *                 else:
   13320             :  */
   13321           0 :           goto __pyx_L11;
   13322             :         }
   13323             : 
   13324             :         /* "View.MemoryView":839
   13325             :  *                     start = shape - 1
   13326             :  *                 else:
   13327             :  *                     start = shape             # <<<<<<<<<<<<<<
   13328             :  *         else:
   13329             :  *             if negative_step:
   13330             :  */
   13331             :         /*else*/ {
   13332             :           __pyx_v_start = __pyx_v_shape;
   13333             :         }
   13334           0 :         __pyx_L11:;
   13335             : 
   13336             :         /* "View.MemoryView":835
   13337             :  *                 if start < 0:
   13338             :  *                     start = 0
   13339             :  *             elif start >= shape:             # <<<<<<<<<<<<<<
   13340             :  *                 if negative_step:
   13341             :  *                     start = shape - 1
   13342             :  */
   13343             :       }
   13344           0 :       __pyx_L9:;
   13345             : 
   13346             :       /* "View.MemoryView":830
   13347             :  * 
   13348             :  * 
   13349             :  *         if have_start:             # <<<<<<<<<<<<<<
   13350             :  *             if start < 0:
   13351             :  *                 start += shape
   13352             :  */
   13353           0 :       goto __pyx_L8;
   13354             :     }
   13355             : 
   13356             :     /* "View.MemoryView":841
   13357             :  *                     start = shape
   13358             :  *         else:
   13359             :  *             if negative_step:             # <<<<<<<<<<<<<<
   13360             :  *                 start = shape - 1
   13361             :  *             else:
   13362             :  */
   13363             :     /*else*/ {
   13364           0 :       if (__pyx_v_negative_step) {
   13365             : 
   13366             :         /* "View.MemoryView":842
   13367             :  *         else:
   13368             :  *             if negative_step:
   13369             :  *                 start = shape - 1             # <<<<<<<<<<<<<<
   13370             :  *             else:
   13371             :  *                 start = 0
   13372             :  */
   13373           0 :         __pyx_v_start = (__pyx_v_shape - 1);
   13374             : 
   13375             :         /* "View.MemoryView":841
   13376             :  *                     start = shape
   13377             :  *         else:
   13378             :  *             if negative_step:             # <<<<<<<<<<<<<<
   13379             :  *                 start = shape - 1
   13380             :  *             else:
   13381             :  */
   13382           0 :         goto __pyx_L12;
   13383             :       }
   13384             : 
   13385             :       /* "View.MemoryView":844
   13386             :  *                 start = shape - 1
   13387             :  *             else:
   13388             :  *                 start = 0             # <<<<<<<<<<<<<<
   13389             :  * 
   13390             :  *         if have_stop:
   13391             :  */
   13392             :       /*else*/ {
   13393             :         __pyx_v_start = 0;
   13394             :       }
   13395           0 :       __pyx_L12:;
   13396             :     }
   13397           0 :     __pyx_L8:;
   13398             : 
   13399             :     /* "View.MemoryView":846
   13400             :  *                 start = 0
   13401             :  * 
   13402             :  *         if have_stop:             # <<<<<<<<<<<<<<
   13403             :  *             if stop < 0:
   13404             :  *                 stop += shape
   13405             :  */
   13406           0 :     __pyx_t_2 = (__pyx_v_have_stop != 0);
   13407           0 :     if (__pyx_t_2) {
   13408             : 
   13409             :       /* "View.MemoryView":847
   13410             :  * 
   13411             :  *         if have_stop:
   13412             :  *             if stop < 0:             # <<<<<<<<<<<<<<
   13413             :  *                 stop += shape
   13414             :  *                 if stop < 0:
   13415             :  */
   13416           0 :       __pyx_t_2 = (__pyx_v_stop < 0);
   13417           0 :       if (__pyx_t_2) {
   13418             : 
   13419             :         /* "View.MemoryView":848
   13420             :  *         if have_stop:
   13421             :  *             if stop < 0:
   13422             :  *                 stop += shape             # <<<<<<<<<<<<<<
   13423             :  *                 if stop < 0:
   13424             :  *                     stop = 0
   13425             :  */
   13426           0 :         __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);
   13427             : 
   13428             :         /* "View.MemoryView":849
   13429             :  *             if stop < 0:
   13430             :  *                 stop += shape
   13431             :  *                 if stop < 0:             # <<<<<<<<<<<<<<
   13432             :  *                     stop = 0
   13433             :  *             elif stop > shape:
   13434             :  */
   13435           0 :         __pyx_t_2 = (__pyx_v_stop < 0);
   13436           0 :         if (__pyx_t_2) {
   13437             : 
   13438             :           /* "View.MemoryView":850
   13439             :  *                 stop += shape
   13440             :  *                 if stop < 0:
   13441             :  *                     stop = 0             # <<<<<<<<<<<<<<
   13442             :  *             elif stop > shape:
   13443             :  *                 stop = shape
   13444             :  */
   13445             :           __pyx_v_stop = 0;
   13446             : 
   13447             :           /* "View.MemoryView":849
   13448             :  *             if stop < 0:
   13449             :  *                 stop += shape
   13450             :  *                 if stop < 0:             # <<<<<<<<<<<<<<
   13451             :  *                     stop = 0
   13452             :  *             elif stop > shape:
   13453             :  */
   13454             :         }
   13455             : 
   13456             :         /* "View.MemoryView":847
   13457             :  * 
   13458             :  *         if have_stop:
   13459             :  *             if stop < 0:             # <<<<<<<<<<<<<<
   13460             :  *                 stop += shape
   13461             :  *                 if stop < 0:
   13462             :  */
   13463           0 :         goto __pyx_L14;
   13464             :       }
   13465             : 
   13466             :       /* "View.MemoryView":851
   13467             :  *                 if stop < 0:
   13468             :  *                     stop = 0
   13469             :  *             elif stop > shape:             # <<<<<<<<<<<<<<
   13470             :  *                 stop = shape
   13471             :  *         else:
   13472             :  */
   13473           0 :       __pyx_t_2 = (__pyx_v_stop > __pyx_v_shape);
   13474           0 :       if (__pyx_t_2) {
   13475             : 
   13476             :         /* "View.MemoryView":852
   13477             :  *                     stop = 0
   13478             :  *             elif stop > shape:
   13479             :  *                 stop = shape             # <<<<<<<<<<<<<<
   13480             :  *         else:
   13481             :  *             if negative_step:
   13482             :  */
   13483             :         __pyx_v_stop = __pyx_v_shape;
   13484             : 
   13485             :         /* "View.MemoryView":851
   13486             :  *                 if stop < 0:
   13487             :  *                     stop = 0
   13488             :  *             elif stop > shape:             # <<<<<<<<<<<<<<
   13489             :  *                 stop = shape
   13490             :  *         else:
   13491             :  */
   13492             :       }
   13493           0 :       __pyx_L14:;
   13494             : 
   13495             :       /* "View.MemoryView":846
   13496             :  *                 start = 0
   13497             :  * 
   13498             :  *         if have_stop:             # <<<<<<<<<<<<<<
   13499             :  *             if stop < 0:
   13500             :  *                 stop += shape
   13501             :  */
   13502           0 :       goto __pyx_L13;
   13503             :     }
   13504             : 
   13505             :     /* "View.MemoryView":854
   13506             :  *                 stop = shape
   13507             :  *         else:
   13508             :  *             if negative_step:             # <<<<<<<<<<<<<<
   13509             :  *                 stop = -1
   13510             :  *             else:
   13511             :  */
   13512             :     /*else*/ {
   13513           0 :       if (__pyx_v_negative_step) {
   13514             : 
   13515             :         /* "View.MemoryView":855
   13516             :  *         else:
   13517             :  *             if negative_step:
   13518             :  *                 stop = -1             # <<<<<<<<<<<<<<
   13519             :  *             else:
   13520             :  *                 stop = shape
   13521             :  */
   13522           0 :         __pyx_v_stop = -1L;
   13523             : 
   13524             :         /* "View.MemoryView":854
   13525             :  *                 stop = shape
   13526             :  *         else:
   13527             :  *             if negative_step:             # <<<<<<<<<<<<<<
   13528             :  *                 stop = -1
   13529             :  *             else:
   13530             :  */
   13531           0 :         goto __pyx_L16;
   13532             :       }
   13533             : 
   13534             :       /* "View.MemoryView":857
   13535             :  *                 stop = -1
   13536             :  *             else:
   13537             :  *                 stop = shape             # <<<<<<<<<<<<<<
   13538             :  * 
   13539             :  * 
   13540             :  */
   13541             :       /*else*/ {
   13542             :         __pyx_v_stop = __pyx_v_shape;
   13543             :       }
   13544           0 :       __pyx_L16:;
   13545             :     }
   13546           0 :     __pyx_L13:;
   13547             : 
   13548             :     /* "View.MemoryView":861
   13549             :  * 
   13550             :  *         with cython.cdivision(True):
   13551             :  *             new_shape = (stop - start) // step             # <<<<<<<<<<<<<<
   13552             :  * 
   13553             :  *             if (stop - start) - step * new_shape:
   13554             :  */
   13555           0 :     __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);
   13556             : 
   13557             :     /* "View.MemoryView":863
   13558             :  *             new_shape = (stop - start) // step
   13559             :  * 
   13560             :  *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
   13561             :  *                 new_shape += 1
   13562             :  * 
   13563             :  */
   13564           0 :     __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
   13565           0 :     if (__pyx_t_2) {
   13566             : 
   13567             :       /* "View.MemoryView":864
   13568             :  * 
   13569             :  *             if (stop - start) - step * new_shape:
   13570             :  *                 new_shape += 1             # <<<<<<<<<<<<<<
   13571             :  * 
   13572             :  *         if new_shape < 0:
   13573             :  */
   13574           0 :       __pyx_v_new_shape = (__pyx_v_new_shape + 1);
   13575             : 
   13576             :       /* "View.MemoryView":863
   13577             :  *             new_shape = (stop - start) // step
   13578             :  * 
   13579             :  *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
   13580             :  *                 new_shape += 1
   13581             :  * 
   13582             :  */
   13583             :     }
   13584             : 
   13585             :     /* "View.MemoryView":866
   13586             :  *                 new_shape += 1
   13587             :  * 
   13588             :  *         if new_shape < 0:             # <<<<<<<<<<<<<<
   13589             :  *             new_shape = 0
   13590             :  * 
   13591             :  */
   13592           0 :     __pyx_t_2 = (__pyx_v_new_shape < 0);
   13593           0 :     if (__pyx_t_2) {
   13594             : 
   13595             :       /* "View.MemoryView":867
   13596             :  * 
   13597             :  *         if new_shape < 0:
   13598             :  *             new_shape = 0             # <<<<<<<<<<<<<<
   13599             :  * 
   13600             :  * 
   13601             :  */
   13602             :       __pyx_v_new_shape = 0;
   13603             : 
   13604             :       /* "View.MemoryView":866
   13605             :  *                 new_shape += 1
   13606             :  * 
   13607             :  *         if new_shape < 0:             # <<<<<<<<<<<<<<
   13608             :  *             new_shape = 0
   13609             :  * 
   13610             :  */
   13611             :     }
   13612             : 
   13613             :     /* "View.MemoryView":870
   13614             :  * 
   13615             :  * 
   13616             :  *         dst.strides[new_ndim] = stride * step             # <<<<<<<<<<<<<<
   13617             :  *         dst.shape[new_ndim] = new_shape
   13618             :  *         dst.suboffsets[new_ndim] = suboffset
   13619             :  */
   13620           0 :     (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);
   13621             : 
   13622             :     /* "View.MemoryView":871
   13623             :  * 
   13624             :  *         dst.strides[new_ndim] = stride * step
   13625             :  *         dst.shape[new_ndim] = new_shape             # <<<<<<<<<<<<<<
   13626             :  *         dst.suboffsets[new_ndim] = suboffset
   13627             :  * 
   13628             :  */
   13629           0 :     (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;
   13630             : 
   13631             :     /* "View.MemoryView":872
   13632             :  *         dst.strides[new_ndim] = stride * step
   13633             :  *         dst.shape[new_ndim] = new_shape
   13634             :  *         dst.suboffsets[new_ndim] = suboffset             # <<<<<<<<<<<<<<
   13635             :  * 
   13636             :  * 
   13637             :  */
   13638           0 :     (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;
   13639             :   }
   13640           0 :   __pyx_L3:;
   13641             : 
   13642             :   /* "View.MemoryView":875
   13643             :  * 
   13644             :  * 
   13645             :  *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
   13646             :  *         dst.data += start * stride
   13647             :  *     else:
   13648             :  */
   13649           0 :   __pyx_t_2 = ((__pyx_v_suboffset_dim[0]) < 0);
   13650           0 :   if (__pyx_t_2) {
   13651             : 
   13652             :     /* "View.MemoryView":876
   13653             :  * 
   13654             :  *     if suboffset_dim[0] < 0:
   13655             :  *         dst.data += start * stride             # <<<<<<<<<<<<<<
   13656             :  *     else:
   13657             :  *         dst.suboffsets[suboffset_dim[0]] += start * stride
   13658             :  */
   13659           0 :     __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));
   13660             : 
   13661             :     /* "View.MemoryView":875
   13662             :  * 
   13663             :  * 
   13664             :  *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
   13665             :  *         dst.data += start * stride
   13666             :  *     else:
   13667             :  */
   13668           0 :     goto __pyx_L19;
   13669             :   }
   13670             : 
   13671             :   /* "View.MemoryView":878
   13672             :  *         dst.data += start * stride
   13673             :  *     else:
   13674             :  *         dst.suboffsets[suboffset_dim[0]] += start * stride             # <<<<<<<<<<<<<<
   13675             :  * 
   13676             :  *     if suboffset >= 0:
   13677             :  */
   13678             :   /*else*/ {
   13679           0 :     __pyx_t_3 = (__pyx_v_suboffset_dim[0]);
   13680           0 :     (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));
   13681             :   }
   13682           0 :   __pyx_L19:;
   13683             : 
   13684             :   /* "View.MemoryView":880
   13685             :  *         dst.suboffsets[suboffset_dim[0]] += start * stride
   13686             :  * 
   13687             :  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
   13688             :  *         if not is_slice:
   13689             :  *             if new_ndim == 0:
   13690             :  */
   13691           0 :   __pyx_t_2 = (__pyx_v_suboffset >= 0);
   13692           0 :   if (__pyx_t_2) {
   13693             : 
   13694             :     /* "View.MemoryView":881
   13695             :  * 
   13696             :  *     if suboffset >= 0:
   13697             :  *         if not is_slice:             # <<<<<<<<<<<<<<
   13698             :  *             if new_ndim == 0:
   13699             :  *                 dst.data = (<char **> dst.data)[0] + suboffset
   13700             :  */
   13701           0 :     __pyx_t_2 = (!__pyx_v_is_slice);
   13702           0 :     if (__pyx_t_2) {
   13703             : 
   13704             :       /* "View.MemoryView":882
   13705             :  *     if suboffset >= 0:
   13706             :  *         if not is_slice:
   13707             :  *             if new_ndim == 0:             # <<<<<<<<<<<<<<
   13708             :  *                 dst.data = (<char **> dst.data)[0] + suboffset
   13709             :  *             else:
   13710             :  */
   13711           0 :       __pyx_t_2 = (__pyx_v_new_ndim == 0);
   13712           0 :       if (__pyx_t_2) {
   13713             : 
   13714             :         /* "View.MemoryView":883
   13715             :  *         if not is_slice:
   13716             :  *             if new_ndim == 0:
   13717             :  *                 dst.data = (<char **> dst.data)[0] + suboffset             # <<<<<<<<<<<<<<
   13718             :  *             else:
   13719             :  *                 _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d "
   13720             :  */
   13721           0 :         __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);
   13722             : 
   13723             :         /* "View.MemoryView":882
   13724             :  *     if suboffset >= 0:
   13725             :  *         if not is_slice:
   13726             :  *             if new_ndim == 0:             # <<<<<<<<<<<<<<
   13727             :  *                 dst.data = (<char **> dst.data)[0] + suboffset
   13728             :  *             else:
   13729             :  */
   13730           0 :         goto __pyx_L22;
   13731             :       }
   13732             : 
   13733             :       /* "View.MemoryView":885
   13734             :  *                 dst.data = (<char **> dst.data)[0] + suboffset
   13735             :  *             else:
   13736             :  *                 _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d "             # <<<<<<<<<<<<<<
   13737             :  *                                      "must be indexed and not sliced", dim)
   13738             :  *         else:
   13739             :  */
   13740             :       /*else*/ {
   13741             : 
   13742             :         /* "View.MemoryView":886
   13743             :  *             else:
   13744             :  *                 _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d "
   13745             :  *                                      "must be indexed and not sliced", dim)             # <<<<<<<<<<<<<<
   13746             :  *         else:
   13747             :  *             suboffset_dim[0] = new_ndim
   13748             :  */
   13749           0 :         __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_kp_s_All_dimensions_preceding_dimensi, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 885, __pyx_L1_error)
   13750             :       }
   13751           0 :       __pyx_L22:;
   13752             : 
   13753             :       /* "View.MemoryView":881
   13754             :  * 
   13755             :  *     if suboffset >= 0:
   13756             :  *         if not is_slice:             # <<<<<<<<<<<<<<
   13757             :  *             if new_ndim == 0:
   13758             :  *                 dst.data = (<char **> dst.data)[0] + suboffset
   13759             :  */
   13760           0 :       goto __pyx_L21;
   13761             :     }
   13762             : 
   13763             :     /* "View.MemoryView":888
   13764             :  *                                      "must be indexed and not sliced", dim)
   13765             :  *         else:
   13766             :  *             suboffset_dim[0] = new_ndim             # <<<<<<<<<<<<<<
   13767             :  * 
   13768             :  *     return 0
   13769             :  */
   13770             :     /*else*/ {
   13771           0 :       (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;
   13772             :     }
   13773           0 :     __pyx_L21:;
   13774             : 
   13775             :     /* "View.MemoryView":880
   13776             :  *         dst.suboffsets[suboffset_dim[0]] += start * stride
   13777             :  * 
   13778             :  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
   13779             :  *         if not is_slice:
   13780             :  *             if new_ndim == 0:
   13781             :  */
   13782             :   }
   13783             : 
   13784             :   /* "View.MemoryView":890
   13785             :  *             suboffset_dim[0] = new_ndim
   13786             :  * 
   13787             :  *     return 0             # <<<<<<<<<<<<<<
   13788             :  * 
   13789             :  * 
   13790             :  */
   13791           0 :   __pyx_r = 0;
   13792           0 :   goto __pyx_L0;
   13793             : 
   13794             :   /* "View.MemoryView":793
   13795             :  * 
   13796             :  * @cname('__pyx_memoryview_slice_memviewslice')
   13797             :  * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
   13798             :  *         __Pyx_memviewslice *dst,
   13799             :  *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
   13800             :  */
   13801             : 
   13802             :   /* function exit code */
   13803           0 :   __pyx_L1_error:;
   13804             :   #ifdef WITH_THREAD
   13805           0 :   __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   13806             :   #endif
   13807           0 :   __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
   13808           0 :   __pyx_r = -1;
   13809             :   #ifdef WITH_THREAD
   13810           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   13811             :   #endif
   13812           0 :   __pyx_L0:;
   13813           0 :   return __pyx_r;
   13814             : }
   13815             : 
   13816             : /* "View.MemoryView":896
   13817             :  * 
   13818             :  * @cname('__pyx_pybuffer_index')
   13819             :  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
   13820             :  *                           Py_ssize_t dim) except NULL:
   13821             :  *     cdef Py_ssize_t shape, stride, suboffset = -1
   13822             :  */
   13823             : 
   13824           0 : static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {
   13825           0 :   Py_ssize_t __pyx_v_shape;
   13826           0 :   Py_ssize_t __pyx_v_stride;
   13827           0 :   Py_ssize_t __pyx_v_suboffset;
   13828           0 :   Py_ssize_t __pyx_v_itemsize;
   13829           0 :   char *__pyx_v_resultp;
   13830           0 :   char *__pyx_r;
   13831             :   __Pyx_RefNannyDeclarations
   13832           0 :   Py_ssize_t __pyx_t_1;
   13833           0 :   int __pyx_t_2;
   13834           0 :   PyObject *__pyx_t_3 = NULL;
   13835           0 :   Py_UCS4 __pyx_t_4;
   13836           0 :   PyObject *__pyx_t_5 = NULL;
   13837           0 :   int __pyx_lineno = 0;
   13838           0 :   const char *__pyx_filename = NULL;
   13839           0 :   int __pyx_clineno = 0;
   13840           0 :   __Pyx_RefNannySetupContext("pybuffer_index", 1);
   13841             : 
   13842             :   /* "View.MemoryView":898
   13843             :  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
   13844             :  *                           Py_ssize_t dim) except NULL:
   13845             :  *     cdef Py_ssize_t shape, stride, suboffset = -1             # <<<<<<<<<<<<<<
   13846             :  *     cdef Py_ssize_t itemsize = view.itemsize
   13847             :  *     cdef char *resultp
   13848             :  */
   13849           0 :   __pyx_v_suboffset = -1L;
   13850             : 
   13851             :   /* "View.MemoryView":899
   13852             :  *                           Py_ssize_t dim) except NULL:
   13853             :  *     cdef Py_ssize_t shape, stride, suboffset = -1
   13854             :  *     cdef Py_ssize_t itemsize = view.itemsize             # <<<<<<<<<<<<<<
   13855             :  *     cdef char *resultp
   13856             :  * 
   13857             :  */
   13858           0 :   __pyx_t_1 = __pyx_v_view->itemsize;
   13859           0 :   __pyx_v_itemsize = __pyx_t_1;
   13860             : 
   13861             :   /* "View.MemoryView":902
   13862             :  *     cdef char *resultp
   13863             :  * 
   13864             :  *     if view.ndim == 0:             # <<<<<<<<<<<<<<
   13865             :  *         shape = view.len // itemsize
   13866             :  *         stride = itemsize
   13867             :  */
   13868           0 :   __pyx_t_2 = (__pyx_v_view->ndim == 0);
   13869           0 :   if (__pyx_t_2) {
   13870             : 
   13871             :     /* "View.MemoryView":903
   13872             :  * 
   13873             :  *     if view.ndim == 0:
   13874             :  *         shape = view.len // itemsize             # <<<<<<<<<<<<<<
   13875             :  *         stride = itemsize
   13876             :  *     else:
   13877             :  */
   13878           0 :     if (unlikely(__pyx_v_itemsize == 0)) {
   13879           0 :       PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
   13880           0 :       __PYX_ERR(1, 903, __pyx_L1_error)
   13881             :     }
   13882           0 :     else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1)  && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
   13883           0 :       PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
   13884           0 :       __PYX_ERR(1, 903, __pyx_L1_error)
   13885             :     }
   13886           0 :     __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize);
   13887             : 
   13888             :     /* "View.MemoryView":904
   13889             :  *     if view.ndim == 0:
   13890             :  *         shape = view.len // itemsize
   13891             :  *         stride = itemsize             # <<<<<<<<<<<<<<
   13892             :  *     else:
   13893             :  *         shape = view.shape[dim]
   13894             :  */
   13895           0 :     __pyx_v_stride = __pyx_v_itemsize;
   13896             : 
   13897             :     /* "View.MemoryView":902
   13898             :  *     cdef char *resultp
   13899             :  * 
   13900             :  *     if view.ndim == 0:             # <<<<<<<<<<<<<<
   13901             :  *         shape = view.len // itemsize
   13902             :  *         stride = itemsize
   13903             :  */
   13904           0 :     goto __pyx_L3;
   13905             :   }
   13906             : 
   13907             :   /* "View.MemoryView":906
   13908             :  *         stride = itemsize
   13909             :  *     else:
   13910             :  *         shape = view.shape[dim]             # <<<<<<<<<<<<<<
   13911             :  *         stride = view.strides[dim]
   13912             :  *         if view.suboffsets != NULL:
   13913             :  */
   13914             :   /*else*/ {
   13915           0 :     __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);
   13916             : 
   13917             :     /* "View.MemoryView":907
   13918             :  *     else:
   13919             :  *         shape = view.shape[dim]
   13920             :  *         stride = view.strides[dim]             # <<<<<<<<<<<<<<
   13921             :  *         if view.suboffsets != NULL:
   13922             :  *             suboffset = view.suboffsets[dim]
   13923             :  */
   13924           0 :     __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);
   13925             : 
   13926             :     /* "View.MemoryView":908
   13927             :  *         shape = view.shape[dim]
   13928             :  *         stride = view.strides[dim]
   13929             :  *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
   13930             :  *             suboffset = view.suboffsets[dim]
   13931             :  * 
   13932             :  */
   13933           0 :     __pyx_t_2 = (__pyx_v_view->suboffsets != NULL);
   13934           0 :     if (__pyx_t_2) {
   13935             : 
   13936             :       /* "View.MemoryView":909
   13937             :  *         stride = view.strides[dim]
   13938             :  *         if view.suboffsets != NULL:
   13939             :  *             suboffset = view.suboffsets[dim]             # <<<<<<<<<<<<<<
   13940             :  * 
   13941             :  *     if index < 0:
   13942             :  */
   13943           0 :       __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);
   13944             : 
   13945             :       /* "View.MemoryView":908
   13946             :  *         shape = view.shape[dim]
   13947             :  *         stride = view.strides[dim]
   13948             :  *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
   13949             :  *             suboffset = view.suboffsets[dim]
   13950             :  * 
   13951             :  */
   13952             :     }
   13953             :   }
   13954           0 :   __pyx_L3:;
   13955             : 
   13956             :   /* "View.MemoryView":911
   13957             :  *             suboffset = view.suboffsets[dim]
   13958             :  * 
   13959             :  *     if index < 0:             # <<<<<<<<<<<<<<
   13960             :  *         index += view.shape[dim]
   13961             :  *         if index < 0:
   13962             :  */
   13963           0 :   __pyx_t_2 = (__pyx_v_index < 0);
   13964           0 :   if (__pyx_t_2) {
   13965             : 
   13966             :     /* "View.MemoryView":912
   13967             :  * 
   13968             :  *     if index < 0:
   13969             :  *         index += view.shape[dim]             # <<<<<<<<<<<<<<
   13970             :  *         if index < 0:
   13971             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   13972             :  */
   13973           0 :     __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));
   13974             : 
   13975             :     /* "View.MemoryView":913
   13976             :  *     if index < 0:
   13977             :  *         index += view.shape[dim]
   13978             :  *         if index < 0:             # <<<<<<<<<<<<<<
   13979             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   13980             :  * 
   13981             :  */
   13982           0 :     __pyx_t_2 = (__pyx_v_index < 0);
   13983           0 :     if (unlikely(__pyx_t_2)) {
   13984             : 
   13985             :       /* "View.MemoryView":914
   13986             :  *         index += view.shape[dim]
   13987             :  *         if index < 0:
   13988             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"             # <<<<<<<<<<<<<<
   13989             :  * 
   13990             :  *     if index >= shape:
   13991             :  */
   13992           0 :       __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 914, __pyx_L1_error)
   13993           0 :       __Pyx_GOTREF(__pyx_t_3);
   13994           0 :       __pyx_t_1 = 0;
   13995           0 :       __pyx_t_4 = 127;
   13996           0 :       __Pyx_INCREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   13997           0 :       __pyx_t_1 += 37;
   13998           0 :       __Pyx_GIVEREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   13999           0 :       PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   14000           0 :       __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 914, __pyx_L1_error)
   14001           0 :       __Pyx_GOTREF(__pyx_t_5);
   14002           0 :       __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
   14003           0 :       __Pyx_GIVEREF(__pyx_t_5);
   14004           0 :       PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
   14005           0 :       __pyx_t_5 = 0;
   14006           0 :       __Pyx_INCREF(__pyx_kp_u__7);
   14007           0 :       __pyx_t_1 += 1;
   14008           0 :       __Pyx_GIVEREF(__pyx_kp_u__7);
   14009           0 :       PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__7);
   14010           0 :       __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 914, __pyx_L1_error)
   14011           0 :       __Pyx_GOTREF(__pyx_t_5);
   14012           0 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   14013           0 :       __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_5, 0, 0);
   14014           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   14015           0 :       __PYX_ERR(1, 914, __pyx_L1_error)
   14016             : 
   14017             :       /* "View.MemoryView":913
   14018             :  *     if index < 0:
   14019             :  *         index += view.shape[dim]
   14020             :  *         if index < 0:             # <<<<<<<<<<<<<<
   14021             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14022             :  * 
   14023             :  */
   14024             :     }
   14025             : 
   14026             :     /* "View.MemoryView":911
   14027             :  *             suboffset = view.suboffsets[dim]
   14028             :  * 
   14029             :  *     if index < 0:             # <<<<<<<<<<<<<<
   14030             :  *         index += view.shape[dim]
   14031             :  *         if index < 0:
   14032             :  */
   14033             :   }
   14034             : 
   14035             :   /* "View.MemoryView":916
   14036             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14037             :  * 
   14038             :  *     if index >= shape:             # <<<<<<<<<<<<<<
   14039             :  *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14040             :  * 
   14041             :  */
   14042           0 :   __pyx_t_2 = (__pyx_v_index >= __pyx_v_shape);
   14043           0 :   if (unlikely(__pyx_t_2)) {
   14044             : 
   14045             :     /* "View.MemoryView":917
   14046             :  * 
   14047             :  *     if index >= shape:
   14048             :  *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"             # <<<<<<<<<<<<<<
   14049             :  * 
   14050             :  *     resultp = bufp + index * stride
   14051             :  */
   14052           0 :     __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 917, __pyx_L1_error)
   14053           0 :     __Pyx_GOTREF(__pyx_t_5);
   14054           0 :     __pyx_t_1 = 0;
   14055           0 :     __pyx_t_4 = 127;
   14056           0 :     __Pyx_INCREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   14057           0 :     __pyx_t_1 += 37;
   14058           0 :     __Pyx_GIVEREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   14059           0 :     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   14060           0 :     __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 917, __pyx_L1_error)
   14061           0 :     __Pyx_GOTREF(__pyx_t_3);
   14062           0 :     __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
   14063           0 :     __Pyx_GIVEREF(__pyx_t_3);
   14064           0 :     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
   14065           0 :     __pyx_t_3 = 0;
   14066           0 :     __Pyx_INCREF(__pyx_kp_u__7);
   14067           0 :     __pyx_t_1 += 1;
   14068           0 :     __Pyx_GIVEREF(__pyx_kp_u__7);
   14069           0 :     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__7);
   14070           0 :     __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 917, __pyx_L1_error)
   14071           0 :     __Pyx_GOTREF(__pyx_t_3);
   14072           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   14073           0 :     __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_3, 0, 0);
   14074           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   14075           0 :     __PYX_ERR(1, 917, __pyx_L1_error)
   14076             : 
   14077             :     /* "View.MemoryView":916
   14078             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14079             :  * 
   14080             :  *     if index >= shape:             # <<<<<<<<<<<<<<
   14081             :  *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14082             :  * 
   14083             :  */
   14084             :   }
   14085             : 
   14086             :   /* "View.MemoryView":919
   14087             :  *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14088             :  * 
   14089             :  *     resultp = bufp + index * stride             # <<<<<<<<<<<<<<
   14090             :  *     if suboffset >= 0:
   14091             :  *         resultp = (<char **> resultp)[0] + suboffset
   14092             :  */
   14093           0 :   __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));
   14094             : 
   14095             :   /* "View.MemoryView":920
   14096             :  * 
   14097             :  *     resultp = bufp + index * stride
   14098             :  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
   14099             :  *         resultp = (<char **> resultp)[0] + suboffset
   14100             :  * 
   14101             :  */
   14102           0 :   __pyx_t_2 = (__pyx_v_suboffset >= 0);
   14103           0 :   if (__pyx_t_2) {
   14104             : 
   14105             :     /* "View.MemoryView":921
   14106             :  *     resultp = bufp + index * stride
   14107             :  *     if suboffset >= 0:
   14108             :  *         resultp = (<char **> resultp)[0] + suboffset             # <<<<<<<<<<<<<<
   14109             :  * 
   14110             :  *     return resultp
   14111             :  */
   14112           0 :     __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);
   14113             : 
   14114             :     /* "View.MemoryView":920
   14115             :  * 
   14116             :  *     resultp = bufp + index * stride
   14117             :  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
   14118             :  *         resultp = (<char **> resultp)[0] + suboffset
   14119             :  * 
   14120             :  */
   14121             :   }
   14122             : 
   14123             :   /* "View.MemoryView":923
   14124             :  *         resultp = (<char **> resultp)[0] + suboffset
   14125             :  * 
   14126             :  *     return resultp             # <<<<<<<<<<<<<<
   14127             :  * 
   14128             :  * 
   14129             :  */
   14130           0 :   __pyx_r = __pyx_v_resultp;
   14131           0 :   goto __pyx_L0;
   14132             : 
   14133             :   /* "View.MemoryView":896
   14134             :  * 
   14135             :  * @cname('__pyx_pybuffer_index')
   14136             :  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
   14137             :  *                           Py_ssize_t dim) except NULL:
   14138             :  *     cdef Py_ssize_t shape, stride, suboffset = -1
   14139             :  */
   14140             : 
   14141             :   /* function exit code */
   14142           0 :   __pyx_L1_error:;
   14143           0 :   __Pyx_XDECREF(__pyx_t_3);
   14144           0 :   __Pyx_XDECREF(__pyx_t_5);
   14145           0 :   __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14146           0 :   __pyx_r = NULL;
   14147           0 :   __pyx_L0:;
   14148           0 :   __Pyx_RefNannyFinishContext();
   14149           0 :   return __pyx_r;
   14150             : }
   14151             : 
   14152             : /* "View.MemoryView":929
   14153             :  * 
   14154             :  * @cname('__pyx_memslice_transpose')
   14155             :  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:             # <<<<<<<<<<<<<<
   14156             :  *     cdef int ndim = memslice.memview.view.ndim
   14157             :  * 
   14158             :  */
   14159             : 
   14160           0 : static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
   14161           0 :   int __pyx_v_ndim;
   14162           0 :   Py_ssize_t *__pyx_v_shape;
   14163           0 :   Py_ssize_t *__pyx_v_strides;
   14164           0 :   int __pyx_v_i;
   14165           0 :   int __pyx_v_j;
   14166           0 :   int __pyx_r;
   14167           0 :   int __pyx_t_1;
   14168           0 :   Py_ssize_t *__pyx_t_2;
   14169           0 :   long __pyx_t_3;
   14170           0 :   long __pyx_t_4;
   14171           0 :   Py_ssize_t __pyx_t_5;
   14172           0 :   Py_ssize_t __pyx_t_6;
   14173           0 :   int __pyx_t_7;
   14174           0 :   int __pyx_t_8;
   14175           0 :   int __pyx_t_9;
   14176           0 :   int __pyx_lineno = 0;
   14177           0 :   const char *__pyx_filename = NULL;
   14178           0 :   int __pyx_clineno = 0;
   14179             :   #ifdef WITH_THREAD
   14180           0 :   PyGILState_STATE __pyx_gilstate_save;
   14181             :   #endif
   14182             : 
   14183             :   /* "View.MemoryView":930
   14184             :  * @cname('__pyx_memslice_transpose')
   14185             :  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:
   14186             :  *     cdef int ndim = memslice.memview.view.ndim             # <<<<<<<<<<<<<<
   14187             :  * 
   14188             :  *     cdef Py_ssize_t *shape = memslice.shape
   14189             :  */
   14190           0 :   __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
   14191           0 :   __pyx_v_ndim = __pyx_t_1;
   14192             : 
   14193             :   /* "View.MemoryView":932
   14194             :  *     cdef int ndim = memslice.memview.view.ndim
   14195             :  * 
   14196             :  *     cdef Py_ssize_t *shape = memslice.shape             # <<<<<<<<<<<<<<
   14197             :  *     cdef Py_ssize_t *strides = memslice.strides
   14198             :  * 
   14199             :  */
   14200           0 :   __pyx_t_2 = __pyx_v_memslice->shape;
   14201           0 :   __pyx_v_shape = __pyx_t_2;
   14202             : 
   14203             :   /* "View.MemoryView":933
   14204             :  * 
   14205             :  *     cdef Py_ssize_t *shape = memslice.shape
   14206             :  *     cdef Py_ssize_t *strides = memslice.strides             # <<<<<<<<<<<<<<
   14207             :  * 
   14208             :  * 
   14209             :  */
   14210           0 :   __pyx_t_2 = __pyx_v_memslice->strides;
   14211           0 :   __pyx_v_strides = __pyx_t_2;
   14212             : 
   14213             :   /* "View.MemoryView":937
   14214             :  * 
   14215             :  *     cdef int i, j
   14216             :  *     for i in range(ndim // 2):             # <<<<<<<<<<<<<<
   14217             :  *         j = ndim - 1 - i
   14218             :  *         strides[i], strides[j] = strides[j], strides[i]
   14219             :  */
   14220           0 :   __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2);
   14221           0 :   __pyx_t_4 = __pyx_t_3;
   14222           0 :   for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
   14223           0 :     __pyx_v_i = __pyx_t_1;
   14224             : 
   14225             :     /* "View.MemoryView":938
   14226             :  *     cdef int i, j
   14227             :  *     for i in range(ndim // 2):
   14228             :  *         j = ndim - 1 - i             # <<<<<<<<<<<<<<
   14229             :  *         strides[i], strides[j] = strides[j], strides[i]
   14230             :  *         shape[i], shape[j] = shape[j], shape[i]
   14231             :  */
   14232           0 :     __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);
   14233             : 
   14234             :     /* "View.MemoryView":939
   14235             :  *     for i in range(ndim // 2):
   14236             :  *         j = ndim - 1 - i
   14237             :  *         strides[i], strides[j] = strides[j], strides[i]             # <<<<<<<<<<<<<<
   14238             :  *         shape[i], shape[j] = shape[j], shape[i]
   14239             :  * 
   14240             :  */
   14241           0 :     __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
   14242           0 :     __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
   14243           0 :     (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
   14244           0 :     (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;
   14245             : 
   14246             :     /* "View.MemoryView":940
   14247             :  *         j = ndim - 1 - i
   14248             :  *         strides[i], strides[j] = strides[j], strides[i]
   14249             :  *         shape[i], shape[j] = shape[j], shape[i]             # <<<<<<<<<<<<<<
   14250             :  * 
   14251             :  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
   14252             :  */
   14253           0 :     __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
   14254           0 :     __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
   14255           0 :     (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
   14256           0 :     (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;
   14257             : 
   14258             :     /* "View.MemoryView":942
   14259             :  *         shape[i], shape[j] = shape[j], shape[i]
   14260             :  * 
   14261             :  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
   14262             :  *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
   14263             :  * 
   14264             :  */
   14265           0 :     __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0);
   14266           0 :     if (!__pyx_t_8) {
   14267           0 :     } else {
   14268           0 :       __pyx_t_7 = __pyx_t_8;
   14269           0 :       goto __pyx_L6_bool_binop_done;
   14270             :     }
   14271           0 :     __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0);
   14272           0 :     __pyx_t_7 = __pyx_t_8;
   14273           0 :     __pyx_L6_bool_binop_done:;
   14274           0 :     if (__pyx_t_7) {
   14275             : 
   14276             :       /* "View.MemoryView":943
   14277             :  * 
   14278             :  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
   14279             :  *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")             # <<<<<<<<<<<<<<
   14280             :  * 
   14281             :  *     return 0
   14282             :  */
   14283           0 :       __pyx_t_9 = __pyx_memoryview_err(PyExc_ValueError, __pyx_kp_s_Cannot_transpose_memoryview_with); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 943, __pyx_L1_error)
   14284             : 
   14285             :       /* "View.MemoryView":942
   14286             :  *         shape[i], shape[j] = shape[j], shape[i]
   14287             :  * 
   14288             :  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
   14289             :  *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
   14290             :  * 
   14291             :  */
   14292             :     }
   14293             :   }
   14294             : 
   14295             :   /* "View.MemoryView":945
   14296             :  *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
   14297             :  * 
   14298             :  *     return 0             # <<<<<<<<<<<<<<
   14299             :  * 
   14300             :  * 
   14301             :  */
   14302           0 :   __pyx_r = 0;
   14303           0 :   goto __pyx_L0;
   14304             : 
   14305             :   /* "View.MemoryView":929
   14306             :  * 
   14307             :  * @cname('__pyx_memslice_transpose')
   14308             :  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:             # <<<<<<<<<<<<<<
   14309             :  *     cdef int ndim = memslice.memview.view.ndim
   14310             :  * 
   14311             :  */
   14312             : 
   14313             :   /* function exit code */
   14314           0 :   __pyx_L1_error:;
   14315             :   #ifdef WITH_THREAD
   14316           0 :   __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   14317             :   #endif
   14318           0 :   __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14319           0 :   __pyx_r = -1;
   14320             :   #ifdef WITH_THREAD
   14321           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   14322             :   #endif
   14323           0 :   __pyx_L0:;
   14324           0 :   return __pyx_r;
   14325             : }
   14326             : 
   14327             : /* "View.MemoryView":963
   14328             :  *     cdef int (*to_dtype_func)(char *, object) except 0
   14329             :  * 
   14330             :  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
   14331             :  *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
   14332             :  * 
   14333             :  */
   14334             : 
   14335             : /* Python wrapper */
   14336             : static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
   14337         338 : static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
   14338         338 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   14339             :   __Pyx_RefNannyDeclarations
   14340         338 :   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
   14341         338 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   14342         676 :   __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
   14343             : 
   14344             :   /* function exit code */
   14345         338 :   __Pyx_RefNannyFinishContext();
   14346             : }
   14347             : 
   14348         338 : static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
   14349             : 
   14350             :   /* "View.MemoryView":964
   14351             :  * 
   14352             :  *     def __dealloc__(self):
   14353             :  *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)             # <<<<<<<<<<<<<<
   14354             :  * 
   14355             :  *     cdef convert_item_to_object(self, char *itemp):
   14356             :  */
   14357         338 :   __PYX_XCLEAR_MEMVIEW((&__pyx_v_self->from_slice), 1);
   14358             : 
   14359             :   /* "View.MemoryView":963
   14360             :  *     cdef int (*to_dtype_func)(char *, object) except 0
   14361             :  * 
   14362             :  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
   14363             :  *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
   14364             :  * 
   14365             :  */
   14366             : 
   14367             :   /* function exit code */
   14368             : }
   14369             : 
   14370             : /* "View.MemoryView":966
   14371             :  *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
   14372             :  * 
   14373             :  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
   14374             :  *         if self.to_object_func != NULL:
   14375             :  *             return self.to_object_func(itemp)
   14376             :  */
   14377             : 
   14378           0 : static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
   14379           0 :   PyObject *__pyx_r = NULL;
   14380             :   __Pyx_RefNannyDeclarations
   14381           0 :   int __pyx_t_1;
   14382           0 :   PyObject *__pyx_t_2 = NULL;
   14383           0 :   int __pyx_lineno = 0;
   14384           0 :   const char *__pyx_filename = NULL;
   14385           0 :   int __pyx_clineno = 0;
   14386           0 :   __Pyx_RefNannySetupContext("convert_item_to_object", 1);
   14387             : 
   14388             :   /* "View.MemoryView":967
   14389             :  * 
   14390             :  *     cdef convert_item_to_object(self, char *itemp):
   14391             :  *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
   14392             :  *             return self.to_object_func(itemp)
   14393             :  *         else:
   14394             :  */
   14395           0 :   __pyx_t_1 = (__pyx_v_self->to_object_func != NULL);
   14396           0 :   if (__pyx_t_1) {
   14397             : 
   14398             :     /* "View.MemoryView":968
   14399             :  *     cdef convert_item_to_object(self, char *itemp):
   14400             :  *         if self.to_object_func != NULL:
   14401             :  *             return self.to_object_func(itemp)             # <<<<<<<<<<<<<<
   14402             :  *         else:
   14403             :  *             return memoryview.convert_item_to_object(self, itemp)
   14404             :  */
   14405           0 :     __Pyx_XDECREF(__pyx_r);
   14406           0 :     __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 968, __pyx_L1_error)
   14407           0 :     __Pyx_GOTREF(__pyx_t_2);
   14408           0 :     __pyx_r = __pyx_t_2;
   14409           0 :     __pyx_t_2 = 0;
   14410           0 :     goto __pyx_L0;
   14411             : 
   14412             :     /* "View.MemoryView":967
   14413             :  * 
   14414             :  *     cdef convert_item_to_object(self, char *itemp):
   14415             :  *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
   14416             :  *             return self.to_object_func(itemp)
   14417             :  *         else:
   14418             :  */
   14419             :   }
   14420             : 
   14421             :   /* "View.MemoryView":970
   14422             :  *             return self.to_object_func(itemp)
   14423             :  *         else:
   14424             :  *             return memoryview.convert_item_to_object(self, itemp)             # <<<<<<<<<<<<<<
   14425             :  * 
   14426             :  *     cdef assign_item_from_object(self, char *itemp, object value):
   14427             :  */
   14428             :   /*else*/ {
   14429           0 :     __Pyx_XDECREF(__pyx_r);
   14430           0 :     __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 970, __pyx_L1_error)
   14431           0 :     __Pyx_GOTREF(__pyx_t_2);
   14432           0 :     __pyx_r = __pyx_t_2;
   14433           0 :     __pyx_t_2 = 0;
   14434           0 :     goto __pyx_L0;
   14435             :   }
   14436             : 
   14437             :   /* "View.MemoryView":966
   14438             :  *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
   14439             :  * 
   14440             :  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
   14441             :  *         if self.to_object_func != NULL:
   14442             :  *             return self.to_object_func(itemp)
   14443             :  */
   14444             : 
   14445             :   /* function exit code */
   14446           0 :   __pyx_L1_error:;
   14447           0 :   __Pyx_XDECREF(__pyx_t_2);
   14448           0 :   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14449           0 :   __pyx_r = 0;
   14450           0 :   __pyx_L0:;
   14451           0 :   __Pyx_XGIVEREF(__pyx_r);
   14452           0 :   __Pyx_RefNannyFinishContext();
   14453           0 :   return __pyx_r;
   14454             : }
   14455             : 
   14456             : /* "View.MemoryView":972
   14457             :  *             return memoryview.convert_item_to_object(self, itemp)
   14458             :  * 
   14459             :  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
   14460             :  *         if self.to_dtype_func != NULL:
   14461             :  *             self.to_dtype_func(itemp, value)
   14462             :  */
   14463             : 
   14464           0 : static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
   14465           0 :   PyObject *__pyx_r = NULL;
   14466             :   __Pyx_RefNannyDeclarations
   14467           0 :   int __pyx_t_1;
   14468           0 :   int __pyx_t_2;
   14469           0 :   PyObject *__pyx_t_3 = NULL;
   14470           0 :   int __pyx_lineno = 0;
   14471           0 :   const char *__pyx_filename = NULL;
   14472           0 :   int __pyx_clineno = 0;
   14473           0 :   __Pyx_RefNannySetupContext("assign_item_from_object", 1);
   14474             : 
   14475             :   /* "View.MemoryView":973
   14476             :  * 
   14477             :  *     cdef assign_item_from_object(self, char *itemp, object value):
   14478             :  *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
   14479             :  *             self.to_dtype_func(itemp, value)
   14480             :  *         else:
   14481             :  */
   14482           0 :   __pyx_t_1 = (__pyx_v_self->to_dtype_func != NULL);
   14483           0 :   if (__pyx_t_1) {
   14484             : 
   14485             :     /* "View.MemoryView":974
   14486             :  *     cdef assign_item_from_object(self, char *itemp, object value):
   14487             :  *         if self.to_dtype_func != NULL:
   14488             :  *             self.to_dtype_func(itemp, value)             # <<<<<<<<<<<<<<
   14489             :  *         else:
   14490             :  *             memoryview.assign_item_from_object(self, itemp, value)
   14491             :  */
   14492           0 :     __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 974, __pyx_L1_error)
   14493             : 
   14494             :     /* "View.MemoryView":973
   14495             :  * 
   14496             :  *     cdef assign_item_from_object(self, char *itemp, object value):
   14497             :  *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
   14498             :  *             self.to_dtype_func(itemp, value)
   14499             :  *         else:
   14500             :  */
   14501           0 :     goto __pyx_L3;
   14502             :   }
   14503             : 
   14504             :   /* "View.MemoryView":976
   14505             :  *             self.to_dtype_func(itemp, value)
   14506             :  *         else:
   14507             :  *             memoryview.assign_item_from_object(self, itemp, value)             # <<<<<<<<<<<<<<
   14508             :  * 
   14509             :  *     cdef _get_base(self):
   14510             :  */
   14511             :   /*else*/ {
   14512           0 :     __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 976, __pyx_L1_error)
   14513           0 :     __Pyx_GOTREF(__pyx_t_3);
   14514           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   14515             :   }
   14516           0 :   __pyx_L3:;
   14517             : 
   14518             :   /* "View.MemoryView":972
   14519             :  *             return memoryview.convert_item_to_object(self, itemp)
   14520             :  * 
   14521             :  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
   14522             :  *         if self.to_dtype_func != NULL:
   14523             :  *             self.to_dtype_func(itemp, value)
   14524             :  */
   14525             : 
   14526             :   /* function exit code */
   14527           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   14528           0 :   goto __pyx_L0;
   14529           0 :   __pyx_L1_error:;
   14530           0 :   __Pyx_XDECREF(__pyx_t_3);
   14531           0 :   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14532           0 :   __pyx_r = 0;
   14533           0 :   __pyx_L0:;
   14534           0 :   __Pyx_XGIVEREF(__pyx_r);
   14535           0 :   __Pyx_RefNannyFinishContext();
   14536           0 :   return __pyx_r;
   14537             : }
   14538             : 
   14539             : /* "View.MemoryView":978
   14540             :  *             memoryview.assign_item_from_object(self, itemp, value)
   14541             :  * 
   14542             :  *     cdef _get_base(self):             # <<<<<<<<<<<<<<
   14543             :  *         return self.from_object
   14544             :  * 
   14545             :  */
   14546             : 
   14547           0 : static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
   14548           0 :   PyObject *__pyx_r = NULL;
   14549             :   __Pyx_RefNannyDeclarations
   14550           0 :   __Pyx_RefNannySetupContext("_get_base", 1);
   14551             : 
   14552             :   /* "View.MemoryView":979
   14553             :  * 
   14554             :  *     cdef _get_base(self):
   14555             :  *         return self.from_object             # <<<<<<<<<<<<<<
   14556             :  * 
   14557             :  * 
   14558             :  */
   14559           0 :   __Pyx_XDECREF(__pyx_r);
   14560           0 :   __Pyx_INCREF(__pyx_v_self->from_object);
   14561           0 :   __pyx_r = __pyx_v_self->from_object;
   14562           0 :   goto __pyx_L0;
   14563             : 
   14564             :   /* "View.MemoryView":978
   14565             :  *             memoryview.assign_item_from_object(self, itemp, value)
   14566             :  * 
   14567             :  *     cdef _get_base(self):             # <<<<<<<<<<<<<<
   14568             :  *         return self.from_object
   14569             :  * 
   14570             :  */
   14571             : 
   14572             :   /* function exit code */
   14573           0 :   __pyx_L0:;
   14574           0 :   __Pyx_XGIVEREF(__pyx_r);
   14575           0 :   __Pyx_RefNannyFinishContext();
   14576           0 :   return __pyx_r;
   14577             : }
   14578             : 
   14579             : /* "(tree fragment)":1
   14580             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
   14581             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14582             :  * def __setstate_cython__(self, __pyx_state):
   14583             :  */
   14584             : 
   14585             : /* Python wrapper */
   14586             : static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, 
   14587             : #if CYTHON_METH_FASTCALL
   14588             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   14589             : #else
   14590             : PyObject *__pyx_args, PyObject *__pyx_kwds
   14591             : #endif
   14592             : ); /*proto*/
   14593           0 : static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, 
   14594             : #if CYTHON_METH_FASTCALL
   14595             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   14596             : #else
   14597             : PyObject *__pyx_args, PyObject *__pyx_kwds
   14598             : #endif
   14599             : ) {
   14600             :   #if !CYTHON_METH_FASTCALL
   14601             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   14602             :   #endif
   14603           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   14604           0 :   PyObject *__pyx_r = 0;
   14605             :   __Pyx_RefNannyDeclarations
   14606           0 :   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
   14607             :   #if !CYTHON_METH_FASTCALL
   14608             :   #if CYTHON_ASSUME_SAFE_MACROS
   14609             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   14610             :   #else
   14611             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   14612             :   #endif
   14613             :   #endif
   14614           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   14615           0 :   if (unlikely(__pyx_nargs > 0)) {
   14616           0 :     __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
   14617           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
   14618           0 :   __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
   14619             : 
   14620             :   /* function exit code */
   14621           0 :   __Pyx_RefNannyFinishContext();
   14622           0 :   return __pyx_r;
   14623             : }
   14624             : 
   14625           0 : static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
   14626           0 :   PyObject *__pyx_r = NULL;
   14627             :   __Pyx_RefNannyDeclarations
   14628           0 :   int __pyx_lineno = 0;
   14629           0 :   const char *__pyx_filename = NULL;
   14630           0 :   int __pyx_clineno = 0;
   14631           0 :   __Pyx_RefNannySetupContext("__reduce_cython__", 1);
   14632             : 
   14633             :   /* "(tree fragment)":2
   14634             :  * def __reduce_cython__(self):
   14635             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
   14636             :  * def __setstate_cython__(self, __pyx_state):
   14637             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14638             :  */
   14639           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
   14640           0 :   __PYX_ERR(1, 2, __pyx_L1_error)
   14641             : 
   14642             :   /* "(tree fragment)":1
   14643             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
   14644             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14645             :  * def __setstate_cython__(self, __pyx_state):
   14646             :  */
   14647             : 
   14648             :   /* function exit code */
   14649           0 :   __pyx_L1_error:;
   14650           0 :   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14651           0 :   __pyx_r = NULL;
   14652           0 :   __Pyx_XGIVEREF(__pyx_r);
   14653           0 :   __Pyx_RefNannyFinishContext();
   14654           0 :   return __pyx_r;
   14655             : }
   14656             : 
   14657             : /* "(tree fragment)":3
   14658             :  * def __reduce_cython__(self):
   14659             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14660             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
   14661             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14662             :  */
   14663             : 
   14664             : /* Python wrapper */
   14665             : static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, 
   14666             : #if CYTHON_METH_FASTCALL
   14667             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   14668             : #else
   14669             : PyObject *__pyx_args, PyObject *__pyx_kwds
   14670             : #endif
   14671             : ); /*proto*/
   14672           0 : static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, 
   14673             : #if CYTHON_METH_FASTCALL
   14674             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   14675             : #else
   14676             : PyObject *__pyx_args, PyObject *__pyx_kwds
   14677             : #endif
   14678             : ) {
   14679           0 :   CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
   14680             :   #if !CYTHON_METH_FASTCALL
   14681             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   14682             :   #endif
   14683           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   14684           0 :   PyObject* values[1] = {0};
   14685           0 :   int __pyx_lineno = 0;
   14686           0 :   const char *__pyx_filename = NULL;
   14687           0 :   int __pyx_clineno = 0;
   14688           0 :   PyObject *__pyx_r = 0;
   14689             :   __Pyx_RefNannyDeclarations
   14690           0 :   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
   14691             :   #if !CYTHON_METH_FASTCALL
   14692             :   #if CYTHON_ASSUME_SAFE_MACROS
   14693             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   14694             :   #else
   14695             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   14696             :   #endif
   14697             :   #endif
   14698           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   14699             :   {
   14700           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
   14701           0 :     if (__pyx_kwds) {
   14702           0 :       Py_ssize_t kw_args;
   14703           0 :       switch (__pyx_nargs) {
   14704           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   14705           0 :         CYTHON_FALLTHROUGH;
   14706           0 :         case  0: break;
   14707           0 :         default: goto __pyx_L5_argtuple_error;
   14708             :       }
   14709           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   14710           0 :       switch (__pyx_nargs) {
   14711             :         case  0:
   14712           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
   14713           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   14714           0 :           kw_args--;
   14715             :         }
   14716           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
   14717           0 :         else goto __pyx_L5_argtuple_error;
   14718             :       }
   14719           0 :       if (unlikely(kw_args > 0)) {
   14720           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   14721           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
   14722             :       }
   14723           0 :     } else if (unlikely(__pyx_nargs != 1)) {
   14724           0 :       goto __pyx_L5_argtuple_error;
   14725             :     } else {
   14726           0 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   14727             :     }
   14728           0 :     __pyx_v___pyx_state = values[0];
   14729             :   }
   14730           0 :   goto __pyx_L6_skip;
   14731           0 :   __pyx_L5_argtuple_error:;
   14732           0 :   __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
   14733           0 :   __pyx_L6_skip:;
   14734           0 :   goto __pyx_L4_argument_unpacking_done;
   14735           0 :   __pyx_L3_error:;
   14736             :   {
   14737           0 :     Py_ssize_t __pyx_temp;
   14738           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   14739             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   14740             :     }
   14741             :   }
   14742           0 :   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14743           0 :   __Pyx_RefNannyFinishContext();
   14744           0 :   return NULL;
   14745           0 :   __pyx_L4_argument_unpacking_done:;
   14746           0 :   __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), __pyx_v___pyx_state);
   14747             : 
   14748             :   /* function exit code */
   14749             :   {
   14750           0 :     Py_ssize_t __pyx_temp;
   14751           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   14752             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   14753             :     }
   14754             :   }
   14755             :   __Pyx_RefNannyFinishContext();
   14756             :   return __pyx_r;
   14757             : }
   14758             : 
   14759           0 : static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
   14760           0 :   PyObject *__pyx_r = NULL;
   14761             :   __Pyx_RefNannyDeclarations
   14762           0 :   int __pyx_lineno = 0;
   14763           0 :   const char *__pyx_filename = NULL;
   14764           0 :   int __pyx_clineno = 0;
   14765           0 :   __Pyx_RefNannySetupContext("__setstate_cython__", 1);
   14766             : 
   14767             :   /* "(tree fragment)":4
   14768             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14769             :  * def __setstate_cython__(self, __pyx_state):
   14770             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
   14771             :  */
   14772           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
   14773           0 :   __PYX_ERR(1, 4, __pyx_L1_error)
   14774             : 
   14775             :   /* "(tree fragment)":3
   14776             :  * def __reduce_cython__(self):
   14777             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14778             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
   14779             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14780             :  */
   14781             : 
   14782             :   /* function exit code */
   14783           0 :   __pyx_L1_error:;
   14784           0 :   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14785           0 :   __pyx_r = NULL;
   14786           0 :   __Pyx_XGIVEREF(__pyx_r);
   14787           0 :   __Pyx_RefNannyFinishContext();
   14788           0 :   return __pyx_r;
   14789             : }
   14790             : 
   14791             : /* "View.MemoryView":999
   14792             :  * 
   14793             :  * @cname('__pyx_memoryview_fromslice')
   14794             :  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
   14795             :  *                           int ndim,
   14796             :  *                           object (*to_object_func)(char *),
   14797             :  */
   14798             : 
   14799         338 : static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) {
   14800         338 :   struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
   14801         338 :   Py_ssize_t __pyx_v_suboffset;
   14802         338 :   PyObject *__pyx_v_length = NULL;
   14803         338 :   PyObject *__pyx_r = NULL;
   14804             :   __Pyx_RefNannyDeclarations
   14805         338 :   int __pyx_t_1;
   14806         338 :   PyObject *__pyx_t_2 = NULL;
   14807         338 :   PyObject *__pyx_t_3 = NULL;
   14808         338 :   __Pyx_TypeInfo *__pyx_t_4;
   14809         338 :   Py_buffer __pyx_t_5;
   14810         338 :   Py_ssize_t *__pyx_t_6;
   14811         338 :   Py_ssize_t *__pyx_t_7;
   14812         338 :   Py_ssize_t *__pyx_t_8;
   14813         338 :   Py_ssize_t __pyx_t_9;
   14814         338 :   int __pyx_lineno = 0;
   14815         338 :   const char *__pyx_filename = NULL;
   14816         338 :   int __pyx_clineno = 0;
   14817         338 :   __Pyx_RefNannySetupContext("memoryview_fromslice", 1);
   14818             : 
   14819             :   /* "View.MemoryView":1007
   14820             :  *     cdef _memoryviewslice result
   14821             :  * 
   14822             :  *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
   14823             :  *         return None
   14824             :  * 
   14825             :  */
   14826         338 :   __pyx_t_1 = (((PyObject *)__pyx_v_memviewslice.memview) == Py_None);
   14827         338 :   if (__pyx_t_1) {
   14828             : 
   14829             :     /* "View.MemoryView":1008
   14830             :  * 
   14831             :  *     if <PyObject *> memviewslice.memview == Py_None:
   14832             :  *         return None             # <<<<<<<<<<<<<<
   14833             :  * 
   14834             :  * 
   14835             :  */
   14836           0 :     __Pyx_XDECREF(__pyx_r);
   14837           0 :     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   14838           0 :     goto __pyx_L0;
   14839             : 
   14840             :     /* "View.MemoryView":1007
   14841             :  *     cdef _memoryviewslice result
   14842             :  * 
   14843             :  *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
   14844             :  *         return None
   14845             :  * 
   14846             :  */
   14847             :   }
   14848             : 
   14849             :   /* "View.MemoryView":1013
   14850             :  * 
   14851             :  * 
   14852             :  *     result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object)             # <<<<<<<<<<<<<<
   14853             :  * 
   14854             :  *     result.from_slice = memviewslice
   14855             :  */
   14856         338 :   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error)
   14857         338 :   __Pyx_GOTREF(__pyx_t_2);
   14858         338 :   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1013, __pyx_L1_error)
   14859         338 :   __Pyx_GOTREF(__pyx_t_3);
   14860         338 :   __Pyx_INCREF(Py_None);
   14861         338 :   __Pyx_GIVEREF(Py_None);
   14862         338 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None)) __PYX_ERR(1, 1013, __pyx_L1_error);
   14863         338 :   __Pyx_INCREF(__pyx_int_0);
   14864         338 :   __Pyx_GIVEREF(__pyx_int_0);
   14865         338 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0)) __PYX_ERR(1, 1013, __pyx_L1_error);
   14866         338 :   __Pyx_GIVEREF(__pyx_t_2);
   14867         338 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error);
   14868         338 :   __pyx_t_2 = 0;
   14869         338 :   __pyx_t_2 = ((PyObject *)__pyx_tp_new__memoryviewslice(((PyTypeObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error)
   14870         338 :   __Pyx_GOTREF((PyObject *)__pyx_t_2);
   14871         338 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   14872         338 :   __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
   14873         338 :   __pyx_t_2 = 0;
   14874             : 
   14875             :   /* "View.MemoryView":1015
   14876             :  *     result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object)
   14877             :  * 
   14878             :  *     result.from_slice = memviewslice             # <<<<<<<<<<<<<<
   14879             :  *     __PYX_INC_MEMVIEW(&memviewslice, 1)
   14880             :  * 
   14881             :  */
   14882         338 :   __pyx_v_result->from_slice = __pyx_v_memviewslice;
   14883             : 
   14884             :   /* "View.MemoryView":1016
   14885             :  * 
   14886             :  *     result.from_slice = memviewslice
   14887             :  *     __PYX_INC_MEMVIEW(&memviewslice, 1)             # <<<<<<<<<<<<<<
   14888             :  * 
   14889             :  *     result.from_object = (<memoryview> memviewslice.memview)._get_base()
   14890             :  */
   14891         338 :   __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);
   14892             : 
   14893             :   /* "View.MemoryView":1018
   14894             :  *     __PYX_INC_MEMVIEW(&memviewslice, 1)
   14895             :  * 
   14896             :  *     result.from_object = (<memoryview> memviewslice.memview)._get_base()             # <<<<<<<<<<<<<<
   14897             :  *     result.typeinfo = memviewslice.memview.typeinfo
   14898             :  * 
   14899             :  */
   14900         338 :   __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->__pyx_vtab)->_get_base(((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1018, __pyx_L1_error)
   14901         338 :   __Pyx_GOTREF(__pyx_t_2);
   14902         338 :   __Pyx_GIVEREF(__pyx_t_2);
   14903         338 :   __Pyx_GOTREF(__pyx_v_result->from_object);
   14904         338 :   __Pyx_DECREF(__pyx_v_result->from_object);
   14905         338 :   __pyx_v_result->from_object = __pyx_t_2;
   14906         338 :   __pyx_t_2 = 0;
   14907             : 
   14908             :   /* "View.MemoryView":1019
   14909             :  * 
   14910             :  *     result.from_object = (<memoryview> memviewslice.memview)._get_base()
   14911             :  *     result.typeinfo = memviewslice.memview.typeinfo             # <<<<<<<<<<<<<<
   14912             :  * 
   14913             :  *     result.view = memviewslice.memview.view
   14914             :  */
   14915         338 :   __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
   14916         338 :   __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;
   14917             : 
   14918             :   /* "View.MemoryView":1021
   14919             :  *     result.typeinfo = memviewslice.memview.typeinfo
   14920             :  * 
   14921             :  *     result.view = memviewslice.memview.view             # <<<<<<<<<<<<<<
   14922             :  *     result.view.buf = <void *> memviewslice.data
   14923             :  *     result.view.ndim = ndim
   14924             :  */
   14925         338 :   __pyx_t_5 = __pyx_v_memviewslice.memview->view;
   14926         338 :   __pyx_v_result->__pyx_base.view = __pyx_t_5;
   14927             : 
   14928             :   /* "View.MemoryView":1022
   14929             :  * 
   14930             :  *     result.view = memviewslice.memview.view
   14931             :  *     result.view.buf = <void *> memviewslice.data             # <<<<<<<<<<<<<<
   14932             :  *     result.view.ndim = ndim
   14933             :  *     (<__pyx_buffer *> &result.view).obj = Py_None
   14934             :  */
   14935         338 :   __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);
   14936             : 
   14937             :   /* "View.MemoryView":1023
   14938             :  *     result.view = memviewslice.memview.view
   14939             :  *     result.view.buf = <void *> memviewslice.data
   14940             :  *     result.view.ndim = ndim             # <<<<<<<<<<<<<<
   14941             :  *     (<__pyx_buffer *> &result.view).obj = Py_None
   14942             :  *     Py_INCREF(Py_None)
   14943             :  */
   14944         338 :   __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;
   14945             : 
   14946             :   /* "View.MemoryView":1024
   14947             :  *     result.view.buf = <void *> memviewslice.data
   14948             :  *     result.view.ndim = ndim
   14949             :  *     (<__pyx_buffer *> &result.view).obj = Py_None             # <<<<<<<<<<<<<<
   14950             :  *     Py_INCREF(Py_None)
   14951             :  * 
   14952             :  */
   14953         338 :   ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;
   14954             : 
   14955             :   /* "View.MemoryView":1025
   14956             :  *     result.view.ndim = ndim
   14957             :  *     (<__pyx_buffer *> &result.view).obj = Py_None
   14958             :  *     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
   14959             :  * 
   14960             :  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
   14961             :  */
   14962         338 :   Py_INCREF(Py_None);
   14963             : 
   14964             :   /* "View.MemoryView":1027
   14965             :  *     Py_INCREF(Py_None)
   14966             :  * 
   14967             :  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
   14968             :  *         result.flags = PyBUF_RECORDS
   14969             :  *     else:
   14970             :  */
   14971         338 :   __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
   14972         338 :   if (__pyx_t_1) {
   14973             : 
   14974             :     /* "View.MemoryView":1028
   14975             :  * 
   14976             :  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
   14977             :  *         result.flags = PyBUF_RECORDS             # <<<<<<<<<<<<<<
   14978             :  *     else:
   14979             :  *         result.flags = PyBUF_RECORDS_RO
   14980             :  */
   14981         338 :     __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;
   14982             : 
   14983             :     /* "View.MemoryView":1027
   14984             :  *     Py_INCREF(Py_None)
   14985             :  * 
   14986             :  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
   14987             :  *         result.flags = PyBUF_RECORDS
   14988             :  *     else:
   14989             :  */
   14990         338 :     goto __pyx_L4;
   14991             :   }
   14992             : 
   14993             :   /* "View.MemoryView":1030
   14994             :  *         result.flags = PyBUF_RECORDS
   14995             :  *     else:
   14996             :  *         result.flags = PyBUF_RECORDS_RO             # <<<<<<<<<<<<<<
   14997             :  * 
   14998             :  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
   14999             :  */
   15000             :   /*else*/ {
   15001           0 :     __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
   15002             :   }
   15003         338 :   __pyx_L4:;
   15004             : 
   15005             :   /* "View.MemoryView":1032
   15006             :  *         result.flags = PyBUF_RECORDS_RO
   15007             :  * 
   15008             :  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape             # <<<<<<<<<<<<<<
   15009             :  *     result.view.strides = <Py_ssize_t *> result.from_slice.strides
   15010             :  * 
   15011             :  */
   15012         338 :   __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);
   15013             : 
   15014             :   /* "View.MemoryView":1033
   15015             :  * 
   15016             :  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
   15017             :  *     result.view.strides = <Py_ssize_t *> result.from_slice.strides             # <<<<<<<<<<<<<<
   15018             :  * 
   15019             :  * 
   15020             :  */
   15021         338 :   __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);
   15022             : 
   15023             :   /* "View.MemoryView":1036
   15024             :  * 
   15025             :  * 
   15026             :  *     result.view.suboffsets = NULL             # <<<<<<<<<<<<<<
   15027             :  *     for suboffset in result.from_slice.suboffsets[:ndim]:
   15028             :  *         if suboffset >= 0:
   15029             :  */
   15030         338 :   __pyx_v_result->__pyx_base.view.suboffsets = NULL;
   15031             : 
   15032             :   /* "View.MemoryView":1037
   15033             :  * 
   15034             :  *     result.view.suboffsets = NULL
   15035             :  *     for suboffset in result.from_slice.suboffsets[:ndim]:             # <<<<<<<<<<<<<<
   15036             :  *         if suboffset >= 0:
   15037             :  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
   15038             :  */
   15039         338 :   __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
   15040         676 :   for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
   15041         338 :     __pyx_t_6 = __pyx_t_8;
   15042         338 :     __pyx_v_suboffset = (__pyx_t_6[0]);
   15043             : 
   15044             :     /* "View.MemoryView":1038
   15045             :  *     result.view.suboffsets = NULL
   15046             :  *     for suboffset in result.from_slice.suboffsets[:ndim]:
   15047             :  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
   15048             :  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
   15049             :  *             break
   15050             :  */
   15051         338 :     __pyx_t_1 = (__pyx_v_suboffset >= 0);
   15052         338 :     if (__pyx_t_1) {
   15053             : 
   15054             :       /* "View.MemoryView":1039
   15055             :  *     for suboffset in result.from_slice.suboffsets[:ndim]:
   15056             :  *         if suboffset >= 0:
   15057             :  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets             # <<<<<<<<<<<<<<
   15058             :  *             break
   15059             :  * 
   15060             :  */
   15061           0 :       __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);
   15062             : 
   15063             :       /* "View.MemoryView":1040
   15064             :  *         if suboffset >= 0:
   15065             :  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
   15066             :  *             break             # <<<<<<<<<<<<<<
   15067             :  * 
   15068             :  *     result.view.len = result.view.itemsize
   15069             :  */
   15070           0 :       goto __pyx_L6_break;
   15071             : 
   15072             :       /* "View.MemoryView":1038
   15073             :  *     result.view.suboffsets = NULL
   15074             :  *     for suboffset in result.from_slice.suboffsets[:ndim]:
   15075             :  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
   15076             :  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
   15077             :  *             break
   15078             :  */
   15079             :     }
   15080             :   }
   15081         338 :   __pyx_L6_break:;
   15082             : 
   15083             :   /* "View.MemoryView":1042
   15084             :  *             break
   15085             :  * 
   15086             :  *     result.view.len = result.view.itemsize             # <<<<<<<<<<<<<<
   15087             :  *     for length in result.view.shape[:ndim]:
   15088             :  *         result.view.len *= length
   15089             :  */
   15090         338 :   __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
   15091         338 :   __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
   15092             : 
   15093             :   /* "View.MemoryView":1043
   15094             :  * 
   15095             :  *     result.view.len = result.view.itemsize
   15096             :  *     for length in result.view.shape[:ndim]:             # <<<<<<<<<<<<<<
   15097             :  *         result.view.len *= length
   15098             :  * 
   15099             :  */
   15100         338 :   __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
   15101         676 :   for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
   15102         338 :     __pyx_t_6 = __pyx_t_8;
   15103         338 :     __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1043, __pyx_L1_error)
   15104         338 :     __Pyx_GOTREF(__pyx_t_2);
   15105         338 :     __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
   15106         338 :     __pyx_t_2 = 0;
   15107             : 
   15108             :     /* "View.MemoryView":1044
   15109             :  *     result.view.len = result.view.itemsize
   15110             :  *     for length in result.view.shape[:ndim]:
   15111             :  *         result.view.len *= length             # <<<<<<<<<<<<<<
   15112             :  * 
   15113             :  *     result.to_object_func = to_object_func
   15114             :  */
   15115         338 :     __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1044, __pyx_L1_error)
   15116         338 :     __Pyx_GOTREF(__pyx_t_2);
   15117         338 :     __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1044, __pyx_L1_error)
   15118         338 :     __Pyx_GOTREF(__pyx_t_3);
   15119         338 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   15120         338 :     __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1044, __pyx_L1_error)
   15121         338 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   15122         338 :     __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
   15123             :   }
   15124             : 
   15125             :   /* "View.MemoryView":1046
   15126             :  *         result.view.len *= length
   15127             :  * 
   15128             :  *     result.to_object_func = to_object_func             # <<<<<<<<<<<<<<
   15129             :  *     result.to_dtype_func = to_dtype_func
   15130             :  * 
   15131             :  */
   15132         338 :   __pyx_v_result->to_object_func = __pyx_v_to_object_func;
   15133             : 
   15134             :   /* "View.MemoryView":1047
   15135             :  * 
   15136             :  *     result.to_object_func = to_object_func
   15137             :  *     result.to_dtype_func = to_dtype_func             # <<<<<<<<<<<<<<
   15138             :  * 
   15139             :  *     return result
   15140             :  */
   15141         338 :   __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;
   15142             : 
   15143             :   /* "View.MemoryView":1049
   15144             :  *     result.to_dtype_func = to_dtype_func
   15145             :  * 
   15146             :  *     return result             # <<<<<<<<<<<<<<
   15147             :  * 
   15148             :  * @cname('__pyx_memoryview_get_slice_from_memoryview')
   15149             :  */
   15150         338 :   __Pyx_XDECREF(__pyx_r);
   15151         338 :   __Pyx_INCREF((PyObject *)__pyx_v_result);
   15152         338 :   __pyx_r = ((PyObject *)__pyx_v_result);
   15153         338 :   goto __pyx_L0;
   15154             : 
   15155             :   /* "View.MemoryView":999
   15156             :  * 
   15157             :  * @cname('__pyx_memoryview_fromslice')
   15158             :  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
   15159             :  *                           int ndim,
   15160             :  *                           object (*to_object_func)(char *),
   15161             :  */
   15162             : 
   15163             :   /* function exit code */
   15164           0 :   __pyx_L1_error:;
   15165           0 :   __Pyx_XDECREF(__pyx_t_2);
   15166           0 :   __Pyx_XDECREF(__pyx_t_3);
   15167           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
   15168           0 :   __pyx_r = 0;
   15169         338 :   __pyx_L0:;
   15170         338 :   __Pyx_XDECREF((PyObject *)__pyx_v_result);
   15171         338 :   __Pyx_XDECREF(__pyx_v_length);
   15172         338 :   __Pyx_XGIVEREF(__pyx_r);
   15173         338 :   __Pyx_RefNannyFinishContext();
   15174         338 :   return __pyx_r;
   15175             : }
   15176             : 
   15177             : /* "View.MemoryView":1052
   15178             :  * 
   15179             :  * @cname('__pyx_memoryview_get_slice_from_memoryview')
   15180             :  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
   15181             :  *                                                    __Pyx_memviewslice *mslice) except NULL:
   15182             :  *     cdef _memoryviewslice obj
   15183             :  */
   15184             : 
   15185           0 : static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
   15186           0 :   struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
   15187           0 :   __Pyx_memviewslice *__pyx_r;
   15188             :   __Pyx_RefNannyDeclarations
   15189           0 :   int __pyx_t_1;
   15190           0 :   PyObject *__pyx_t_2 = NULL;
   15191           0 :   int __pyx_lineno = 0;
   15192           0 :   const char *__pyx_filename = NULL;
   15193           0 :   int __pyx_clineno = 0;
   15194           0 :   __Pyx_RefNannySetupContext("get_slice_from_memview", 1);
   15195             : 
   15196             :   /* "View.MemoryView":1055
   15197             :  *                                                    __Pyx_memviewslice *mslice) except NULL:
   15198             :  *     cdef _memoryviewslice obj
   15199             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   15200             :  *         obj = memview
   15201             :  *         return &obj.from_slice
   15202             :  */
   15203           0 :   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
   15204           0 :   if (__pyx_t_1) {
   15205             : 
   15206             :     /* "View.MemoryView":1056
   15207             :  *     cdef _memoryviewslice obj
   15208             :  *     if isinstance(memview, _memoryviewslice):
   15209             :  *         obj = memview             # <<<<<<<<<<<<<<
   15210             :  *         return &obj.from_slice
   15211             :  *     else:
   15212             :  */
   15213           0 :     if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 1056, __pyx_L1_error)
   15214           0 :     __pyx_t_2 = ((PyObject *)__pyx_v_memview);
   15215           0 :     __Pyx_INCREF(__pyx_t_2);
   15216           0 :     __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
   15217           0 :     __pyx_t_2 = 0;
   15218             : 
   15219             :     /* "View.MemoryView":1057
   15220             :  *     if isinstance(memview, _memoryviewslice):
   15221             :  *         obj = memview
   15222             :  *         return &obj.from_slice             # <<<<<<<<<<<<<<
   15223             :  *     else:
   15224             :  *         slice_copy(memview, mslice)
   15225             :  */
   15226           0 :     __pyx_r = (&__pyx_v_obj->from_slice);
   15227           0 :     goto __pyx_L0;
   15228             : 
   15229             :     /* "View.MemoryView":1055
   15230             :  *                                                    __Pyx_memviewslice *mslice) except NULL:
   15231             :  *     cdef _memoryviewslice obj
   15232             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   15233             :  *         obj = memview
   15234             :  *         return &obj.from_slice
   15235             :  */
   15236             :   }
   15237             : 
   15238             :   /* "View.MemoryView":1059
   15239             :  *         return &obj.from_slice
   15240             :  *     else:
   15241             :  *         slice_copy(memview, mslice)             # <<<<<<<<<<<<<<
   15242             :  *         return mslice
   15243             :  * 
   15244             :  */
   15245             :   /*else*/ {
   15246           0 :     __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);
   15247             : 
   15248             :     /* "View.MemoryView":1060
   15249             :  *     else:
   15250             :  *         slice_copy(memview, mslice)
   15251             :  *         return mslice             # <<<<<<<<<<<<<<
   15252             :  * 
   15253             :  * @cname('__pyx_memoryview_slice_copy')
   15254             :  */
   15255           0 :     __pyx_r = __pyx_v_mslice;
   15256           0 :     goto __pyx_L0;
   15257             :   }
   15258             : 
   15259             :   /* "View.MemoryView":1052
   15260             :  * 
   15261             :  * @cname('__pyx_memoryview_get_slice_from_memoryview')
   15262             :  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
   15263             :  *                                                    __Pyx_memviewslice *mslice) except NULL:
   15264             :  *     cdef _memoryviewslice obj
   15265             :  */
   15266             : 
   15267             :   /* function exit code */
   15268           0 :   __pyx_L1_error:;
   15269           0 :   __Pyx_XDECREF(__pyx_t_2);
   15270           0 :   __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
   15271           0 :   __pyx_r = NULL;
   15272           0 :   __pyx_L0:;
   15273           0 :   __Pyx_XDECREF((PyObject *)__pyx_v_obj);
   15274           0 :   __Pyx_RefNannyFinishContext();
   15275           0 :   return __pyx_r;
   15276             : }
   15277             : 
   15278             : /* "View.MemoryView":1063
   15279             :  * 
   15280             :  * @cname('__pyx_memoryview_slice_copy')
   15281             :  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept:             # <<<<<<<<<<<<<<
   15282             :  *     cdef int dim
   15283             :  *     cdef (Py_ssize_t*) shape, strides, suboffsets
   15284             :  */
   15285             : 
   15286           0 : static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
   15287           0 :   int __pyx_v_dim;
   15288           0 :   Py_ssize_t *__pyx_v_shape;
   15289           0 :   Py_ssize_t *__pyx_v_strides;
   15290           0 :   Py_ssize_t *__pyx_v_suboffsets;
   15291           0 :   Py_ssize_t *__pyx_t_1;
   15292           0 :   int __pyx_t_2;
   15293           0 :   int __pyx_t_3;
   15294           0 :   int __pyx_t_4;
   15295           0 :   Py_ssize_t __pyx_t_5;
   15296           0 :   int __pyx_t_6;
   15297             : 
   15298             :   /* "View.MemoryView":1067
   15299             :  *     cdef (Py_ssize_t*) shape, strides, suboffsets
   15300             :  * 
   15301             :  *     shape = memview.view.shape             # <<<<<<<<<<<<<<
   15302             :  *     strides = memview.view.strides
   15303             :  *     suboffsets = memview.view.suboffsets
   15304             :  */
   15305           0 :   __pyx_t_1 = __pyx_v_memview->view.shape;
   15306           0 :   __pyx_v_shape = __pyx_t_1;
   15307             : 
   15308             :   /* "View.MemoryView":1068
   15309             :  * 
   15310             :  *     shape = memview.view.shape
   15311             :  *     strides = memview.view.strides             # <<<<<<<<<<<<<<
   15312             :  *     suboffsets = memview.view.suboffsets
   15313             :  * 
   15314             :  */
   15315           0 :   __pyx_t_1 = __pyx_v_memview->view.strides;
   15316           0 :   __pyx_v_strides = __pyx_t_1;
   15317             : 
   15318             :   /* "View.MemoryView":1069
   15319             :  *     shape = memview.view.shape
   15320             :  *     strides = memview.view.strides
   15321             :  *     suboffsets = memview.view.suboffsets             # <<<<<<<<<<<<<<
   15322             :  * 
   15323             :  *     dst.memview = <__pyx_memoryview *> memview
   15324             :  */
   15325           0 :   __pyx_t_1 = __pyx_v_memview->view.suboffsets;
   15326           0 :   __pyx_v_suboffsets = __pyx_t_1;
   15327             : 
   15328             :   /* "View.MemoryView":1071
   15329             :  *     suboffsets = memview.view.suboffsets
   15330             :  * 
   15331             :  *     dst.memview = <__pyx_memoryview *> memview             # <<<<<<<<<<<<<<
   15332             :  *     dst.data = <char *> memview.view.buf
   15333             :  * 
   15334             :  */
   15335           0 :   __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);
   15336             : 
   15337             :   /* "View.MemoryView":1072
   15338             :  * 
   15339             :  *     dst.memview = <__pyx_memoryview *> memview
   15340             :  *     dst.data = <char *> memview.view.buf             # <<<<<<<<<<<<<<
   15341             :  * 
   15342             :  *     for dim in range(memview.view.ndim):
   15343             :  */
   15344           0 :   __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);
   15345             : 
   15346             :   /* "View.MemoryView":1074
   15347             :  *     dst.data = <char *> memview.view.buf
   15348             :  * 
   15349             :  *     for dim in range(memview.view.ndim):             # <<<<<<<<<<<<<<
   15350             :  *         dst.shape[dim] = shape[dim]
   15351             :  *         dst.strides[dim] = strides[dim]
   15352             :  */
   15353           0 :   __pyx_t_2 = __pyx_v_memview->view.ndim;
   15354           0 :   __pyx_t_3 = __pyx_t_2;
   15355           0 :   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   15356           0 :     __pyx_v_dim = __pyx_t_4;
   15357             : 
   15358             :     /* "View.MemoryView":1075
   15359             :  * 
   15360             :  *     for dim in range(memview.view.ndim):
   15361             :  *         dst.shape[dim] = shape[dim]             # <<<<<<<<<<<<<<
   15362             :  *         dst.strides[dim] = strides[dim]
   15363             :  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
   15364             :  */
   15365           0 :     (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);
   15366             : 
   15367             :     /* "View.MemoryView":1076
   15368             :  *     for dim in range(memview.view.ndim):
   15369             :  *         dst.shape[dim] = shape[dim]
   15370             :  *         dst.strides[dim] = strides[dim]             # <<<<<<<<<<<<<<
   15371             :  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
   15372             :  * 
   15373             :  */
   15374           0 :     (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);
   15375             : 
   15376             :     /* "View.MemoryView":1077
   15377             :  *         dst.shape[dim] = shape[dim]
   15378             :  *         dst.strides[dim] = strides[dim]
   15379             :  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1             # <<<<<<<<<<<<<<
   15380             :  * 
   15381             :  * @cname('__pyx_memoryview_copy_object')
   15382             :  */
   15383           0 :     __pyx_t_6 = (__pyx_v_suboffsets != 0);
   15384           0 :     if (__pyx_t_6) {
   15385           0 :       __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
   15386             :     } else {
   15387             :       __pyx_t_5 = -1L;
   15388             :     }
   15389           0 :     (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
   15390             :   }
   15391             : 
   15392             :   /* "View.MemoryView":1063
   15393             :  * 
   15394             :  * @cname('__pyx_memoryview_slice_copy')
   15395             :  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept:             # <<<<<<<<<<<<<<
   15396             :  *     cdef int dim
   15397             :  *     cdef (Py_ssize_t*) shape, strides, suboffsets
   15398             :  */
   15399             : 
   15400             :   /* function exit code */
   15401           0 : }
   15402             : 
   15403             : /* "View.MemoryView":1080
   15404             :  * 
   15405             :  * @cname('__pyx_memoryview_copy_object')
   15406             :  * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
   15407             :  *     "Create a new memoryview object"
   15408             :  *     cdef __Pyx_memviewslice memviewslice
   15409             :  */
   15410             : 
   15411           0 : static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
   15412           0 :   __Pyx_memviewslice __pyx_v_memviewslice;
   15413           0 :   PyObject *__pyx_r = NULL;
   15414             :   __Pyx_RefNannyDeclarations
   15415           0 :   PyObject *__pyx_t_1 = NULL;
   15416           0 :   int __pyx_lineno = 0;
   15417           0 :   const char *__pyx_filename = NULL;
   15418           0 :   int __pyx_clineno = 0;
   15419           0 :   __Pyx_RefNannySetupContext("memoryview_copy", 1);
   15420             : 
   15421             :   /* "View.MemoryView":1083
   15422             :  *     "Create a new memoryview object"
   15423             :  *     cdef __Pyx_memviewslice memviewslice
   15424             :  *     slice_copy(memview, &memviewslice)             # <<<<<<<<<<<<<<
   15425             :  *     return memoryview_copy_from_slice(memview, &memviewslice)
   15426             :  * 
   15427             :  */
   15428           0 :   __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));
   15429             : 
   15430             :   /* "View.MemoryView":1084
   15431             :  *     cdef __Pyx_memviewslice memviewslice
   15432             :  *     slice_copy(memview, &memviewslice)
   15433             :  *     return memoryview_copy_from_slice(memview, &memviewslice)             # <<<<<<<<<<<<<<
   15434             :  * 
   15435             :  * @cname('__pyx_memoryview_copy_object_from_slice')
   15436             :  */
   15437           0 :   __Pyx_XDECREF(__pyx_r);
   15438           0 :   __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1084, __pyx_L1_error)
   15439           0 :   __Pyx_GOTREF(__pyx_t_1);
   15440           0 :   __pyx_r = __pyx_t_1;
   15441           0 :   __pyx_t_1 = 0;
   15442           0 :   goto __pyx_L0;
   15443             : 
   15444             :   /* "View.MemoryView":1080
   15445             :  * 
   15446             :  * @cname('__pyx_memoryview_copy_object')
   15447             :  * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
   15448             :  *     "Create a new memoryview object"
   15449             :  *     cdef __Pyx_memviewslice memviewslice
   15450             :  */
   15451             : 
   15452             :   /* function exit code */
   15453           0 :   __pyx_L1_error:;
   15454           0 :   __Pyx_XDECREF(__pyx_t_1);
   15455           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
   15456           0 :   __pyx_r = 0;
   15457           0 :   __pyx_L0:;
   15458           0 :   __Pyx_XGIVEREF(__pyx_r);
   15459           0 :   __Pyx_RefNannyFinishContext();
   15460           0 :   return __pyx_r;
   15461             : }
   15462             : 
   15463             : /* "View.MemoryView":1087
   15464             :  * 
   15465             :  * @cname('__pyx_memoryview_copy_object_from_slice')
   15466             :  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
   15467             :  *     """
   15468             :  *     Create a new memoryview object from a given memoryview object and slice.
   15469             :  */
   15470             : 
   15471           0 : static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
   15472           0 :   PyObject *(*__pyx_v_to_object_func)(char *);
   15473           0 :   int (*__pyx_v_to_dtype_func)(char *, PyObject *);
   15474           0 :   PyObject *__pyx_r = NULL;
   15475             :   __Pyx_RefNannyDeclarations
   15476           0 :   int __pyx_t_1;
   15477           0 :   PyObject *(*__pyx_t_2)(char *);
   15478           0 :   int (*__pyx_t_3)(char *, PyObject *);
   15479           0 :   PyObject *__pyx_t_4 = NULL;
   15480           0 :   int __pyx_lineno = 0;
   15481           0 :   const char *__pyx_filename = NULL;
   15482           0 :   int __pyx_clineno = 0;
   15483           0 :   __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 1);
   15484             : 
   15485             :   /* "View.MemoryView":1094
   15486             :  *     cdef int (*to_dtype_func)(char *, object) except 0
   15487             :  * 
   15488             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   15489             :  *         to_object_func = (<_memoryviewslice> memview).to_object_func
   15490             :  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
   15491             :  */
   15492           0 :   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
   15493           0 :   if (__pyx_t_1) {
   15494             : 
   15495             :     /* "View.MemoryView":1095
   15496             :  * 
   15497             :  *     if isinstance(memview, _memoryviewslice):
   15498             :  *         to_object_func = (<_memoryviewslice> memview).to_object_func             # <<<<<<<<<<<<<<
   15499             :  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
   15500             :  *     else:
   15501             :  */
   15502           0 :     __pyx_t_2 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
   15503           0 :     __pyx_v_to_object_func = __pyx_t_2;
   15504             : 
   15505             :     /* "View.MemoryView":1096
   15506             :  *     if isinstance(memview, _memoryviewslice):
   15507             :  *         to_object_func = (<_memoryviewslice> memview).to_object_func
   15508             :  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func             # <<<<<<<<<<<<<<
   15509             :  *     else:
   15510             :  *         to_object_func = NULL
   15511             :  */
   15512           0 :     __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
   15513           0 :     __pyx_v_to_dtype_func = __pyx_t_3;
   15514             : 
   15515             :     /* "View.MemoryView":1094
   15516             :  *     cdef int (*to_dtype_func)(char *, object) except 0
   15517             :  * 
   15518             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   15519             :  *         to_object_func = (<_memoryviewslice> memview).to_object_func
   15520             :  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
   15521             :  */
   15522           0 :     goto __pyx_L3;
   15523             :   }
   15524             : 
   15525             :   /* "View.MemoryView":1098
   15526             :  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
   15527             :  *     else:
   15528             :  *         to_object_func = NULL             # <<<<<<<<<<<<<<
   15529             :  *         to_dtype_func = NULL
   15530             :  * 
   15531             :  */
   15532             :   /*else*/ {
   15533             :     __pyx_v_to_object_func = NULL;
   15534             : 
   15535             :     /* "View.MemoryView":1099
   15536             :  *     else:
   15537             :  *         to_object_func = NULL
   15538             :  *         to_dtype_func = NULL             # <<<<<<<<<<<<<<
   15539             :  * 
   15540             :  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
   15541             :  */
   15542             :     __pyx_v_to_dtype_func = NULL;
   15543             :   }
   15544           0 :   __pyx_L3:;
   15545             : 
   15546             :   /* "View.MemoryView":1101
   15547             :  *         to_dtype_func = NULL
   15548             :  * 
   15549             :  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,             # <<<<<<<<<<<<<<
   15550             :  *                                 to_object_func, to_dtype_func,
   15551             :  *                                 memview.dtype_is_object)
   15552             :  */
   15553           0 :   __Pyx_XDECREF(__pyx_r);
   15554             : 
   15555             :   /* "View.MemoryView":1103
   15556             :  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
   15557             :  *                                 to_object_func, to_dtype_func,
   15558             :  *                                 memview.dtype_is_object)             # <<<<<<<<<<<<<<
   15559             :  * 
   15560             :  * 
   15561             :  */
   15562           0 :   __pyx_t_4 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1101, __pyx_L1_error)
   15563           0 :   __Pyx_GOTREF(__pyx_t_4);
   15564           0 :   __pyx_r = __pyx_t_4;
   15565           0 :   __pyx_t_4 = 0;
   15566           0 :   goto __pyx_L0;
   15567             : 
   15568             :   /* "View.MemoryView":1087
   15569             :  * 
   15570             :  * @cname('__pyx_memoryview_copy_object_from_slice')
   15571             :  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
   15572             :  *     """
   15573             :  *     Create a new memoryview object from a given memoryview object and slice.
   15574             :  */
   15575             : 
   15576             :   /* function exit code */
   15577           0 :   __pyx_L1_error:;
   15578           0 :   __Pyx_XDECREF(__pyx_t_4);
   15579           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
   15580           0 :   __pyx_r = 0;
   15581           0 :   __pyx_L0:;
   15582           0 :   __Pyx_XGIVEREF(__pyx_r);
   15583           0 :   __Pyx_RefNannyFinishContext();
   15584           0 :   return __pyx_r;
   15585             : }
   15586             : 
   15587             : /* "View.MemoryView":1109
   15588             :  * 
   15589             :  * 
   15590             :  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:             # <<<<<<<<<<<<<<
   15591             :  *     return -arg if arg < 0 else arg
   15592             :  * 
   15593             :  */
   15594             : 
   15595           0 : static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
   15596           0 :   Py_ssize_t __pyx_r;
   15597           0 :   Py_ssize_t __pyx_t_1;
   15598           0 :   int __pyx_t_2;
   15599             : 
   15600             :   /* "View.MemoryView":1110
   15601             :  * 
   15602             :  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:
   15603             :  *     return -arg if arg < 0 else arg             # <<<<<<<<<<<<<<
   15604             :  * 
   15605             :  * @cname('__pyx_get_best_slice_order')
   15606             :  */
   15607           0 :   __pyx_t_2 = (__pyx_v_arg < 0);
   15608           0 :   if (__pyx_t_2) {
   15609             :     __pyx_t_1 = (-__pyx_v_arg);
   15610             :   } else {
   15611             :     __pyx_t_1 = __pyx_v_arg;
   15612             :   }
   15613           0 :   __pyx_r = __pyx_t_1;
   15614           0 :   goto __pyx_L0;
   15615             : 
   15616             :   /* "View.MemoryView":1109
   15617             :  * 
   15618             :  * 
   15619             :  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:             # <<<<<<<<<<<<<<
   15620             :  *     return -arg if arg < 0 else arg
   15621             :  * 
   15622             :  */
   15623             : 
   15624             :   /* function exit code */
   15625           0 :   __pyx_L0:;
   15626           0 :   return __pyx_r;
   15627             : }
   15628             : 
   15629             : /* "View.MemoryView":1113
   15630             :  * 
   15631             :  * @cname('__pyx_get_best_slice_order')
   15632             :  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil:             # <<<<<<<<<<<<<<
   15633             :  *     """
   15634             :  *     Figure out the best memory access order for a given slice.
   15635             :  */
   15636             : 
   15637           0 : static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
   15638           0 :   int __pyx_v_i;
   15639           0 :   Py_ssize_t __pyx_v_c_stride;
   15640           0 :   Py_ssize_t __pyx_v_f_stride;
   15641           0 :   char __pyx_r;
   15642           0 :   int __pyx_t_1;
   15643           0 :   int __pyx_t_2;
   15644           0 :   int __pyx_t_3;
   15645           0 :   int __pyx_t_4;
   15646             : 
   15647             :   /* "View.MemoryView":1118
   15648             :  *     """
   15649             :  *     cdef int i
   15650             :  *     cdef Py_ssize_t c_stride = 0             # <<<<<<<<<<<<<<
   15651             :  *     cdef Py_ssize_t f_stride = 0
   15652             :  * 
   15653             :  */
   15654           0 :   __pyx_v_c_stride = 0;
   15655             : 
   15656             :   /* "View.MemoryView":1119
   15657             :  *     cdef int i
   15658             :  *     cdef Py_ssize_t c_stride = 0
   15659             :  *     cdef Py_ssize_t f_stride = 0             # <<<<<<<<<<<<<<
   15660             :  * 
   15661             :  *     for i in range(ndim - 1, -1, -1):
   15662             :  */
   15663           0 :   __pyx_v_f_stride = 0;
   15664             : 
   15665             :   /* "View.MemoryView":1121
   15666             :  *     cdef Py_ssize_t f_stride = 0
   15667             :  * 
   15668             :  *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
   15669             :  *         if mslice.shape[i] > 1:
   15670             :  *             c_stride = mslice.strides[i]
   15671             :  */
   15672           0 :   for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
   15673           0 :     __pyx_v_i = __pyx_t_1;
   15674             : 
   15675             :     /* "View.MemoryView":1122
   15676             :  * 
   15677             :  *     for i in range(ndim - 1, -1, -1):
   15678             :  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
   15679             :  *             c_stride = mslice.strides[i]
   15680             :  *             break
   15681             :  */
   15682           0 :     __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1);
   15683           0 :     if (__pyx_t_2) {
   15684             : 
   15685             :       /* "View.MemoryView":1123
   15686             :  *     for i in range(ndim - 1, -1, -1):
   15687             :  *         if mslice.shape[i] > 1:
   15688             :  *             c_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
   15689             :  *             break
   15690             :  * 
   15691             :  */
   15692           0 :       __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
   15693             : 
   15694             :       /* "View.MemoryView":1124
   15695             :  *         if mslice.shape[i] > 1:
   15696             :  *             c_stride = mslice.strides[i]
   15697             :  *             break             # <<<<<<<<<<<<<<
   15698             :  * 
   15699             :  *     for i in range(ndim):
   15700             :  */
   15701           0 :       goto __pyx_L4_break;
   15702             : 
   15703             :       /* "View.MemoryView":1122
   15704             :  * 
   15705             :  *     for i in range(ndim - 1, -1, -1):
   15706             :  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
   15707             :  *             c_stride = mslice.strides[i]
   15708             :  *             break
   15709             :  */
   15710             :     }
   15711             :   }
   15712           0 :   __pyx_L4_break:;
   15713             : 
   15714             :   /* "View.MemoryView":1126
   15715             :  *             break
   15716             :  * 
   15717             :  *     for i in range(ndim):             # <<<<<<<<<<<<<<
   15718             :  *         if mslice.shape[i] > 1:
   15719             :  *             f_stride = mslice.strides[i]
   15720             :  */
   15721           0 :   __pyx_t_1 = __pyx_v_ndim;
   15722           0 :   __pyx_t_3 = __pyx_t_1;
   15723           0 :   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   15724           0 :     __pyx_v_i = __pyx_t_4;
   15725             : 
   15726             :     /* "View.MemoryView":1127
   15727             :  * 
   15728             :  *     for i in range(ndim):
   15729             :  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
   15730             :  *             f_stride = mslice.strides[i]
   15731             :  *             break
   15732             :  */
   15733           0 :     __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1);
   15734           0 :     if (__pyx_t_2) {
   15735             : 
   15736             :       /* "View.MemoryView":1128
   15737             :  *     for i in range(ndim):
   15738             :  *         if mslice.shape[i] > 1:
   15739             :  *             f_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
   15740             :  *             break
   15741             :  * 
   15742             :  */
   15743           0 :       __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
   15744             : 
   15745             :       /* "View.MemoryView":1129
   15746             :  *         if mslice.shape[i] > 1:
   15747             :  *             f_stride = mslice.strides[i]
   15748             :  *             break             # <<<<<<<<<<<<<<
   15749             :  * 
   15750             :  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
   15751             :  */
   15752           0 :       goto __pyx_L7_break;
   15753             : 
   15754             :       /* "View.MemoryView":1127
   15755             :  * 
   15756             :  *     for i in range(ndim):
   15757             :  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
   15758             :  *             f_stride = mslice.strides[i]
   15759             :  *             break
   15760             :  */
   15761             :     }
   15762             :   }
   15763           0 :   __pyx_L7_break:;
   15764             : 
   15765             :   /* "View.MemoryView":1131
   15766             :  *             break
   15767             :  * 
   15768             :  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
   15769             :  *         return 'C'
   15770             :  *     else:
   15771             :  */
   15772           0 :   __pyx_t_2 = (abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride));
   15773           0 :   if (__pyx_t_2) {
   15774             : 
   15775             :     /* "View.MemoryView":1132
   15776             :  * 
   15777             :  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
   15778             :  *         return 'C'             # <<<<<<<<<<<<<<
   15779             :  *     else:
   15780             :  *         return 'F'
   15781             :  */
   15782           0 :     __pyx_r = 'C';
   15783           0 :     goto __pyx_L0;
   15784             : 
   15785             :     /* "View.MemoryView":1131
   15786             :  *             break
   15787             :  * 
   15788             :  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
   15789             :  *         return 'C'
   15790             :  *     else:
   15791             :  */
   15792             :   }
   15793             : 
   15794             :   /* "View.MemoryView":1134
   15795             :  *         return 'C'
   15796             :  *     else:
   15797             :  *         return 'F'             # <<<<<<<<<<<<<<
   15798             :  * 
   15799             :  * @cython.cdivision(True)
   15800             :  */
   15801             :   /*else*/ {
   15802           0 :     __pyx_r = 'F';
   15803           0 :     goto __pyx_L0;
   15804             :   }
   15805             : 
   15806             :   /* "View.MemoryView":1113
   15807             :  * 
   15808             :  * @cname('__pyx_get_best_slice_order')
   15809             :  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil:             # <<<<<<<<<<<<<<
   15810             :  *     """
   15811             :  *     Figure out the best memory access order for a given slice.
   15812             :  */
   15813             : 
   15814             :   /* function exit code */
   15815           0 :   __pyx_L0:;
   15816           0 :   return __pyx_r;
   15817             : }
   15818             : 
   15819             : /* "View.MemoryView":1137
   15820             :  * 
   15821             :  * @cython.cdivision(True)
   15822             :  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
   15823             :  *                                    char *dst_data, Py_ssize_t *dst_strides,
   15824             :  *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
   15825             :  */
   15826             : 
   15827           0 : static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
   15828           0 :   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
   15829           0 :   CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
   15830           0 :   Py_ssize_t __pyx_v_dst_extent;
   15831           0 :   Py_ssize_t __pyx_v_src_stride;
   15832           0 :   Py_ssize_t __pyx_v_dst_stride;
   15833           0 :   int __pyx_t_1;
   15834           0 :   int __pyx_t_2;
   15835           0 :   Py_ssize_t __pyx_t_3;
   15836           0 :   Py_ssize_t __pyx_t_4;
   15837           0 :   Py_ssize_t __pyx_t_5;
   15838             : 
   15839             :   /* "View.MemoryView":1144
   15840             :  * 
   15841             :  *     cdef Py_ssize_t i
   15842             :  *     cdef Py_ssize_t src_extent = src_shape[0]             # <<<<<<<<<<<<<<
   15843             :  *     cdef Py_ssize_t dst_extent = dst_shape[0]
   15844             :  *     cdef Py_ssize_t src_stride = src_strides[0]
   15845             :  */
   15846           0 :   __pyx_v_src_extent = (__pyx_v_src_shape[0]);
   15847             : 
   15848             :   /* "View.MemoryView":1145
   15849             :  *     cdef Py_ssize_t i
   15850             :  *     cdef Py_ssize_t src_extent = src_shape[0]
   15851             :  *     cdef Py_ssize_t dst_extent = dst_shape[0]             # <<<<<<<<<<<<<<
   15852             :  *     cdef Py_ssize_t src_stride = src_strides[0]
   15853             :  *     cdef Py_ssize_t dst_stride = dst_strides[0]
   15854             :  */
   15855           0 :   __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);
   15856             : 
   15857             :   /* "View.MemoryView":1146
   15858             :  *     cdef Py_ssize_t src_extent = src_shape[0]
   15859             :  *     cdef Py_ssize_t dst_extent = dst_shape[0]
   15860             :  *     cdef Py_ssize_t src_stride = src_strides[0]             # <<<<<<<<<<<<<<
   15861             :  *     cdef Py_ssize_t dst_stride = dst_strides[0]
   15862             :  * 
   15863             :  */
   15864           0 :   __pyx_v_src_stride = (__pyx_v_src_strides[0]);
   15865             : 
   15866             :   /* "View.MemoryView":1147
   15867             :  *     cdef Py_ssize_t dst_extent = dst_shape[0]
   15868             :  *     cdef Py_ssize_t src_stride = src_strides[0]
   15869             :  *     cdef Py_ssize_t dst_stride = dst_strides[0]             # <<<<<<<<<<<<<<
   15870             :  * 
   15871             :  *     if ndim == 1:
   15872             :  */
   15873           0 :   __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);
   15874             : 
   15875             :   /* "View.MemoryView":1149
   15876             :  *     cdef Py_ssize_t dst_stride = dst_strides[0]
   15877             :  * 
   15878             :  *     if ndim == 1:             # <<<<<<<<<<<<<<
   15879             :  *         if (src_stride > 0 and dst_stride > 0 and
   15880             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   15881             :  */
   15882           0 :   __pyx_t_1 = (__pyx_v_ndim == 1);
   15883           0 :   if (__pyx_t_1) {
   15884             : 
   15885             :     /* "View.MemoryView":1150
   15886             :  * 
   15887             :  *     if ndim == 1:
   15888             :  *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
   15889             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   15890             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)
   15891             :  */
   15892           0 :     __pyx_t_2 = (__pyx_v_src_stride > 0);
   15893           0 :     if (__pyx_t_2) {
   15894           0 :     } else {
   15895           0 :       __pyx_t_1 = __pyx_t_2;
   15896           0 :       goto __pyx_L5_bool_binop_done;
   15897             :     }
   15898           0 :     __pyx_t_2 = (__pyx_v_dst_stride > 0);
   15899           0 :     if (__pyx_t_2) {
   15900           0 :     } else {
   15901           0 :       __pyx_t_1 = __pyx_t_2;
   15902           0 :       goto __pyx_L5_bool_binop_done;
   15903             :     }
   15904             : 
   15905             :     /* "View.MemoryView":1151
   15906             :  *     if ndim == 1:
   15907             :  *         if (src_stride > 0 and dst_stride > 0 and
   15908             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):             # <<<<<<<<<<<<<<
   15909             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)
   15910             :  *         else:
   15911             :  */
   15912           0 :     __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
   15913           0 :     if (__pyx_t_2) {
   15914           0 :       __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
   15915             :     }
   15916             :     __pyx_t_1 = __pyx_t_2;
   15917           0 :     __pyx_L5_bool_binop_done:;
   15918             : 
   15919             :     /* "View.MemoryView":1150
   15920             :  * 
   15921             :  *     if ndim == 1:
   15922             :  *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
   15923             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   15924             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)
   15925             :  */
   15926           0 :     if (__pyx_t_1) {
   15927             : 
   15928             :       /* "View.MemoryView":1152
   15929             :  *         if (src_stride > 0 and dst_stride > 0 and
   15930             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   15931             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)             # <<<<<<<<<<<<<<
   15932             :  *         else:
   15933             :  *             for i in range(dst_extent):
   15934             :  */
   15935           0 :       (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));
   15936             : 
   15937             :       /* "View.MemoryView":1150
   15938             :  * 
   15939             :  *     if ndim == 1:
   15940             :  *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
   15941             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   15942             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)
   15943             :  */
   15944           0 :       goto __pyx_L4;
   15945             :     }
   15946             : 
   15947             :     /* "View.MemoryView":1154
   15948             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)
   15949             :  *         else:
   15950             :  *             for i in range(dst_extent):             # <<<<<<<<<<<<<<
   15951             :  *                 memcpy(dst_data, src_data, itemsize)
   15952             :  *                 src_data += src_stride
   15953             :  */
   15954             :     /*else*/ {
   15955             :       __pyx_t_3 = __pyx_v_dst_extent;
   15956             :       __pyx_t_4 = __pyx_t_3;
   15957           0 :       for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
   15958           0 :         __pyx_v_i = __pyx_t_5;
   15959             : 
   15960             :         /* "View.MemoryView":1155
   15961             :  *         else:
   15962             :  *             for i in range(dst_extent):
   15963             :  *                 memcpy(dst_data, src_data, itemsize)             # <<<<<<<<<<<<<<
   15964             :  *                 src_data += src_stride
   15965             :  *                 dst_data += dst_stride
   15966             :  */
   15967           0 :         (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));
   15968             : 
   15969             :         /* "View.MemoryView":1156
   15970             :  *             for i in range(dst_extent):
   15971             :  *                 memcpy(dst_data, src_data, itemsize)
   15972             :  *                 src_data += src_stride             # <<<<<<<<<<<<<<
   15973             :  *                 dst_data += dst_stride
   15974             :  *     else:
   15975             :  */
   15976           0 :         __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
   15977             : 
   15978             :         /* "View.MemoryView":1157
   15979             :  *                 memcpy(dst_data, src_data, itemsize)
   15980             :  *                 src_data += src_stride
   15981             :  *                 dst_data += dst_stride             # <<<<<<<<<<<<<<
   15982             :  *     else:
   15983             :  *         for i in range(dst_extent):
   15984             :  */
   15985           0 :         __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
   15986             :       }
   15987             :     }
   15988           0 :     __pyx_L4:;
   15989             : 
   15990             :     /* "View.MemoryView":1149
   15991             :  *     cdef Py_ssize_t dst_stride = dst_strides[0]
   15992             :  * 
   15993             :  *     if ndim == 1:             # <<<<<<<<<<<<<<
   15994             :  *         if (src_stride > 0 and dst_stride > 0 and
   15995             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   15996             :  */
   15997           0 :     goto __pyx_L3;
   15998             :   }
   15999             : 
   16000             :   /* "View.MemoryView":1159
   16001             :  *                 dst_data += dst_stride
   16002             :  *     else:
   16003             :  *         for i in range(dst_extent):             # <<<<<<<<<<<<<<
   16004             :  *             _copy_strided_to_strided(src_data, src_strides + 1,
   16005             :  *                                      dst_data, dst_strides + 1,
   16006             :  */
   16007             :   /*else*/ {
   16008             :     __pyx_t_3 = __pyx_v_dst_extent;
   16009             :     __pyx_t_4 = __pyx_t_3;
   16010           0 :     for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
   16011           0 :       __pyx_v_i = __pyx_t_5;
   16012             : 
   16013             :       /* "View.MemoryView":1160
   16014             :  *     else:
   16015             :  *         for i in range(dst_extent):
   16016             :  *             _copy_strided_to_strided(src_data, src_strides + 1,             # <<<<<<<<<<<<<<
   16017             :  *                                      dst_data, dst_strides + 1,
   16018             :  *                                      src_shape + 1, dst_shape + 1,
   16019             :  */
   16020           0 :       _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);
   16021             : 
   16022             :       /* "View.MemoryView":1164
   16023             :  *                                      src_shape + 1, dst_shape + 1,
   16024             :  *                                      ndim - 1, itemsize)
   16025             :  *             src_data += src_stride             # <<<<<<<<<<<<<<
   16026             :  *             dst_data += dst_stride
   16027             :  * 
   16028             :  */
   16029           0 :       __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
   16030             : 
   16031             :       /* "View.MemoryView":1165
   16032             :  *                                      ndim - 1, itemsize)
   16033             :  *             src_data += src_stride
   16034             :  *             dst_data += dst_stride             # <<<<<<<<<<<<<<
   16035             :  * 
   16036             :  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
   16037             :  */
   16038           0 :       __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
   16039             :     }
   16040             :   }
   16041           0 :   __pyx_L3:;
   16042             : 
   16043             :   /* "View.MemoryView":1137
   16044             :  * 
   16045             :  * @cython.cdivision(True)
   16046             :  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
   16047             :  *                                    char *dst_data, Py_ssize_t *dst_strides,
   16048             :  *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
   16049             :  */
   16050             : 
   16051             :   /* function exit code */
   16052           0 : }
   16053             : 
   16054             : /* "View.MemoryView":1167
   16055             :  *             dst_data += dst_stride
   16056             :  * 
   16057             :  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
   16058             :  *                                   __Pyx_memviewslice *dst,
   16059             :  *                                   int ndim, size_t itemsize) noexcept nogil:
   16060             :  */
   16061             : 
   16062           0 : static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
   16063             : 
   16064             :   /* "View.MemoryView":1170
   16065             :  *                                   __Pyx_memviewslice *dst,
   16066             :  *                                   int ndim, size_t itemsize) noexcept nogil:
   16067             :  *     _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides,             # <<<<<<<<<<<<<<
   16068             :  *                              src.shape, dst.shape, ndim, itemsize)
   16069             :  * 
   16070             :  */
   16071           0 :   _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);
   16072             : 
   16073             :   /* "View.MemoryView":1167
   16074             :  *             dst_data += dst_stride
   16075             :  * 
   16076             :  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
   16077             :  *                                   __Pyx_memviewslice *dst,
   16078             :  *                                   int ndim, size_t itemsize) noexcept nogil:
   16079             :  */
   16080             : 
   16081             :   /* function exit code */
   16082           0 : }
   16083             : 
   16084             : /* "View.MemoryView":1174
   16085             :  * 
   16086             :  * @cname('__pyx_memoryview_slice_get_size')
   16087             :  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:             # <<<<<<<<<<<<<<
   16088             :  *     "Return the size of the memory occupied by the slice in number of bytes"
   16089             :  *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
   16090             :  */
   16091             : 
   16092           0 : static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
   16093           0 :   Py_ssize_t __pyx_v_shape;
   16094           0 :   Py_ssize_t __pyx_v_size;
   16095           0 :   Py_ssize_t __pyx_r;
   16096           0 :   Py_ssize_t __pyx_t_1;
   16097           0 :   Py_ssize_t *__pyx_t_2;
   16098           0 :   Py_ssize_t *__pyx_t_3;
   16099           0 :   Py_ssize_t *__pyx_t_4;
   16100             : 
   16101             :   /* "View.MemoryView":1176
   16102             :  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:
   16103             :  *     "Return the size of the memory occupied by the slice in number of bytes"
   16104             :  *     cdef Py_ssize_t shape, size = src.memview.view.itemsize             # <<<<<<<<<<<<<<
   16105             :  * 
   16106             :  *     for shape in src.shape[:ndim]:
   16107             :  */
   16108           0 :   __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
   16109           0 :   __pyx_v_size = __pyx_t_1;
   16110             : 
   16111             :   /* "View.MemoryView":1178
   16112             :  *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
   16113             :  * 
   16114             :  *     for shape in src.shape[:ndim]:             # <<<<<<<<<<<<<<
   16115             :  *         size *= shape
   16116             :  * 
   16117             :  */
   16118           0 :   __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim);
   16119           0 :   for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
   16120           0 :     __pyx_t_2 = __pyx_t_4;
   16121           0 :     __pyx_v_shape = (__pyx_t_2[0]);
   16122             : 
   16123             :     /* "View.MemoryView":1179
   16124             :  * 
   16125             :  *     for shape in src.shape[:ndim]:
   16126             :  *         size *= shape             # <<<<<<<<<<<<<<
   16127             :  * 
   16128             :  *     return size
   16129             :  */
   16130           0 :     __pyx_v_size = (__pyx_v_size * __pyx_v_shape);
   16131             :   }
   16132             : 
   16133             :   /* "View.MemoryView":1181
   16134             :  *         size *= shape
   16135             :  * 
   16136             :  *     return size             # <<<<<<<<<<<<<<
   16137             :  * 
   16138             :  * @cname('__pyx_fill_contig_strides_array')
   16139             :  */
   16140           0 :   __pyx_r = __pyx_v_size;
   16141           0 :   goto __pyx_L0;
   16142             : 
   16143             :   /* "View.MemoryView":1174
   16144             :  * 
   16145             :  * @cname('__pyx_memoryview_slice_get_size')
   16146             :  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:             # <<<<<<<<<<<<<<
   16147             :  *     "Return the size of the memory occupied by the slice in number of bytes"
   16148             :  *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
   16149             :  */
   16150             : 
   16151             :   /* function exit code */
   16152           0 :   __pyx_L0:;
   16153           0 :   return __pyx_r;
   16154             : }
   16155             : 
   16156             : /* "View.MemoryView":1184
   16157             :  * 
   16158             :  * @cname('__pyx_fill_contig_strides_array')
   16159             :  * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
   16160             :  *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
   16161             :  *                 int ndim, char order) noexcept nogil:
   16162             :  */
   16163             : 
   16164           0 : static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {
   16165           0 :   int __pyx_v_idx;
   16166           0 :   Py_ssize_t __pyx_r;
   16167           0 :   int __pyx_t_1;
   16168           0 :   int __pyx_t_2;
   16169           0 :   int __pyx_t_3;
   16170           0 :   int __pyx_t_4;
   16171             : 
   16172             :   /* "View.MemoryView":1193
   16173             :  *     cdef int idx
   16174             :  * 
   16175             :  *     if order == 'F':             # <<<<<<<<<<<<<<
   16176             :  *         for idx in range(ndim):
   16177             :  *             strides[idx] = stride
   16178             :  */
   16179           0 :   __pyx_t_1 = (__pyx_v_order == 'F');
   16180           0 :   if (__pyx_t_1) {
   16181             : 
   16182             :     /* "View.MemoryView":1194
   16183             :  * 
   16184             :  *     if order == 'F':
   16185             :  *         for idx in range(ndim):             # <<<<<<<<<<<<<<
   16186             :  *             strides[idx] = stride
   16187             :  *             stride *= shape[idx]
   16188             :  */
   16189           0 :     __pyx_t_2 = __pyx_v_ndim;
   16190             :     __pyx_t_3 = __pyx_t_2;
   16191           0 :     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   16192           0 :       __pyx_v_idx = __pyx_t_4;
   16193             : 
   16194             :       /* "View.MemoryView":1195
   16195             :  *     if order == 'F':
   16196             :  *         for idx in range(ndim):
   16197             :  *             strides[idx] = stride             # <<<<<<<<<<<<<<
   16198             :  *             stride *= shape[idx]
   16199             :  *     else:
   16200             :  */
   16201           0 :       (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
   16202             : 
   16203             :       /* "View.MemoryView":1196
   16204             :  *         for idx in range(ndim):
   16205             :  *             strides[idx] = stride
   16206             :  *             stride *= shape[idx]             # <<<<<<<<<<<<<<
   16207             :  *     else:
   16208             :  *         for idx in range(ndim - 1, -1, -1):
   16209             :  */
   16210           0 :       __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
   16211             :     }
   16212             : 
   16213             :     /* "View.MemoryView":1193
   16214             :  *     cdef int idx
   16215             :  * 
   16216             :  *     if order == 'F':             # <<<<<<<<<<<<<<
   16217             :  *         for idx in range(ndim):
   16218             :  *             strides[idx] = stride
   16219             :  */
   16220           0 :     goto __pyx_L3;
   16221             :   }
   16222             : 
   16223             :   /* "View.MemoryView":1198
   16224             :  *             stride *= shape[idx]
   16225             :  *     else:
   16226             :  *         for idx in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
   16227             :  *             strides[idx] = stride
   16228             :  *             stride *= shape[idx]
   16229             :  */
   16230             :   /*else*/ {
   16231           0 :     for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
   16232           0 :       __pyx_v_idx = __pyx_t_2;
   16233             : 
   16234             :       /* "View.MemoryView":1199
   16235             :  *     else:
   16236             :  *         for idx in range(ndim - 1, -1, -1):
   16237             :  *             strides[idx] = stride             # <<<<<<<<<<<<<<
   16238             :  *             stride *= shape[idx]
   16239             :  * 
   16240             :  */
   16241           0 :       (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
   16242             : 
   16243             :       /* "View.MemoryView":1200
   16244             :  *         for idx in range(ndim - 1, -1, -1):
   16245             :  *             strides[idx] = stride
   16246             :  *             stride *= shape[idx]             # <<<<<<<<<<<<<<
   16247             :  * 
   16248             :  *     return stride
   16249             :  */
   16250           0 :       __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
   16251             :     }
   16252             :   }
   16253           0 :   __pyx_L3:;
   16254             : 
   16255             :   /* "View.MemoryView":1202
   16256             :  *             stride *= shape[idx]
   16257             :  * 
   16258             :  *     return stride             # <<<<<<<<<<<<<<
   16259             :  * 
   16260             :  * @cname('__pyx_memoryview_copy_data_to_temp')
   16261             :  */
   16262           0 :   __pyx_r = __pyx_v_stride;
   16263           0 :   goto __pyx_L0;
   16264             : 
   16265             :   /* "View.MemoryView":1184
   16266             :  * 
   16267             :  * @cname('__pyx_fill_contig_strides_array')
   16268             :  * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
   16269             :  *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
   16270             :  *                 int ndim, char order) noexcept nogil:
   16271             :  */
   16272             : 
   16273             :   /* function exit code */
   16274           0 :   __pyx_L0:;
   16275           0 :   return __pyx_r;
   16276             : }
   16277             : 
   16278             : /* "View.MemoryView":1205
   16279             :  * 
   16280             :  * @cname('__pyx_memoryview_copy_data_to_temp')
   16281             :  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
   16282             :  *                              __Pyx_memviewslice *tmpslice,
   16283             :  *                              char order,
   16284             :  */
   16285             : 
   16286           0 : static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {
   16287           0 :   int __pyx_v_i;
   16288           0 :   void *__pyx_v_result;
   16289           0 :   size_t __pyx_v_itemsize;
   16290           0 :   size_t __pyx_v_size;
   16291           0 :   void *__pyx_r;
   16292           0 :   Py_ssize_t __pyx_t_1;
   16293           0 :   int __pyx_t_2;
   16294           0 :   int __pyx_t_3;
   16295           0 :   struct __pyx_memoryview_obj *__pyx_t_4;
   16296           0 :   int __pyx_t_5;
   16297           0 :   int __pyx_t_6;
   16298           0 :   int __pyx_lineno = 0;
   16299           0 :   const char *__pyx_filename = NULL;
   16300           0 :   int __pyx_clineno = 0;
   16301             :   #ifdef WITH_THREAD
   16302           0 :   PyGILState_STATE __pyx_gilstate_save;
   16303             :   #endif
   16304             : 
   16305             :   /* "View.MemoryView":1216
   16306             :  *     cdef void *result
   16307             :  * 
   16308             :  *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
   16309             :  *     cdef size_t size = slice_get_size(src, ndim)
   16310             :  * 
   16311             :  */
   16312           0 :   __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
   16313           0 :   __pyx_v_itemsize = __pyx_t_1;
   16314             : 
   16315             :   /* "View.MemoryView":1217
   16316             :  * 
   16317             :  *     cdef size_t itemsize = src.memview.view.itemsize
   16318             :  *     cdef size_t size = slice_get_size(src, ndim)             # <<<<<<<<<<<<<<
   16319             :  * 
   16320             :  *     result = malloc(size)
   16321             :  */
   16322           0 :   __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);
   16323             : 
   16324             :   /* "View.MemoryView":1219
   16325             :  *     cdef size_t size = slice_get_size(src, ndim)
   16326             :  * 
   16327             :  *     result = malloc(size)             # <<<<<<<<<<<<<<
   16328             :  *     if not result:
   16329             :  *         _err_no_memory()
   16330             :  */
   16331           0 :   __pyx_v_result = malloc(__pyx_v_size);
   16332             : 
   16333             :   /* "View.MemoryView":1220
   16334             :  * 
   16335             :  *     result = malloc(size)
   16336             :  *     if not result:             # <<<<<<<<<<<<<<
   16337             :  *         _err_no_memory()
   16338             :  * 
   16339             :  */
   16340           0 :   __pyx_t_2 = (!(__pyx_v_result != 0));
   16341           0 :   if (__pyx_t_2) {
   16342             : 
   16343             :     /* "View.MemoryView":1221
   16344             :  *     result = malloc(size)
   16345             :  *     if not result:
   16346             :  *         _err_no_memory()             # <<<<<<<<<<<<<<
   16347             :  * 
   16348             :  * 
   16349             :  */
   16350           0 :     __pyx_t_3 = __pyx_memoryview_err_no_memory(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1221, __pyx_L1_error)
   16351             : 
   16352             :     /* "View.MemoryView":1220
   16353             :  * 
   16354             :  *     result = malloc(size)
   16355             :  *     if not result:             # <<<<<<<<<<<<<<
   16356             :  *         _err_no_memory()
   16357             :  * 
   16358             :  */
   16359             :   }
   16360             : 
   16361             :   /* "View.MemoryView":1224
   16362             :  * 
   16363             :  * 
   16364             :  *     tmpslice.data = <char *> result             # <<<<<<<<<<<<<<
   16365             :  *     tmpslice.memview = src.memview
   16366             :  *     for i in range(ndim):
   16367             :  */
   16368           0 :   __pyx_v_tmpslice->data = ((char *)__pyx_v_result);
   16369             : 
   16370             :   /* "View.MemoryView":1225
   16371             :  * 
   16372             :  *     tmpslice.data = <char *> result
   16373             :  *     tmpslice.memview = src.memview             # <<<<<<<<<<<<<<
   16374             :  *     for i in range(ndim):
   16375             :  *         tmpslice.shape[i] = src.shape[i]
   16376             :  */
   16377           0 :   __pyx_t_4 = __pyx_v_src->memview;
   16378           0 :   __pyx_v_tmpslice->memview = __pyx_t_4;
   16379             : 
   16380             :   /* "View.MemoryView":1226
   16381             :  *     tmpslice.data = <char *> result
   16382             :  *     tmpslice.memview = src.memview
   16383             :  *     for i in range(ndim):             # <<<<<<<<<<<<<<
   16384             :  *         tmpslice.shape[i] = src.shape[i]
   16385             :  *         tmpslice.suboffsets[i] = -1
   16386             :  */
   16387           0 :   __pyx_t_3 = __pyx_v_ndim;
   16388           0 :   __pyx_t_5 = __pyx_t_3;
   16389           0 :   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
   16390           0 :     __pyx_v_i = __pyx_t_6;
   16391             : 
   16392             :     /* "View.MemoryView":1227
   16393             :  *     tmpslice.memview = src.memview
   16394             :  *     for i in range(ndim):
   16395             :  *         tmpslice.shape[i] = src.shape[i]             # <<<<<<<<<<<<<<
   16396             :  *         tmpslice.suboffsets[i] = -1
   16397             :  * 
   16398             :  */
   16399           0 :     (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);
   16400             : 
   16401             :     /* "View.MemoryView":1228
   16402             :  *     for i in range(ndim):
   16403             :  *         tmpslice.shape[i] = src.shape[i]
   16404             :  *         tmpslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
   16405             :  * 
   16406             :  *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order)
   16407             :  */
   16408           0 :     (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
   16409             :   }
   16410             : 
   16411             :   /* "View.MemoryView":1230
   16412             :  *         tmpslice.suboffsets[i] = -1
   16413             :  * 
   16414             :  *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order)             # <<<<<<<<<<<<<<
   16415             :  * 
   16416             :  * 
   16417             :  */
   16418           0 :   (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));
   16419             : 
   16420             :   /* "View.MemoryView":1233
   16421             :  * 
   16422             :  * 
   16423             :  *     for i in range(ndim):             # <<<<<<<<<<<<<<
   16424             :  *         if tmpslice.shape[i] == 1:
   16425             :  *             tmpslice.strides[i] = 0
   16426             :  */
   16427           0 :   __pyx_t_3 = __pyx_v_ndim;
   16428           0 :   __pyx_t_5 = __pyx_t_3;
   16429           0 :   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
   16430           0 :     __pyx_v_i = __pyx_t_6;
   16431             : 
   16432             :     /* "View.MemoryView":1234
   16433             :  * 
   16434             :  *     for i in range(ndim):
   16435             :  *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
   16436             :  *             tmpslice.strides[i] = 0
   16437             :  * 
   16438             :  */
   16439           0 :     __pyx_t_2 = ((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1);
   16440           0 :     if (__pyx_t_2) {
   16441             : 
   16442             :       /* "View.MemoryView":1235
   16443             :  *     for i in range(ndim):
   16444             :  *         if tmpslice.shape[i] == 1:
   16445             :  *             tmpslice.strides[i] = 0             # <<<<<<<<<<<<<<
   16446             :  * 
   16447             :  *     if slice_is_contig(src[0], order, ndim):
   16448             :  */
   16449           0 :       (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;
   16450             : 
   16451             :       /* "View.MemoryView":1234
   16452             :  * 
   16453             :  *     for i in range(ndim):
   16454             :  *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
   16455             :  *             tmpslice.strides[i] = 0
   16456             :  * 
   16457             :  */
   16458             :     }
   16459             :   }
   16460             : 
   16461             :   /* "View.MemoryView":1237
   16462             :  *             tmpslice.strides[i] = 0
   16463             :  * 
   16464             :  *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
   16465             :  *         memcpy(result, src.data, size)
   16466             :  *     else:
   16467             :  */
   16468           0 :   __pyx_t_2 = __pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim);
   16469           0 :   if (__pyx_t_2) {
   16470             : 
   16471             :     /* "View.MemoryView":1238
   16472             :  * 
   16473             :  *     if slice_is_contig(src[0], order, ndim):
   16474             :  *         memcpy(result, src.data, size)             # <<<<<<<<<<<<<<
   16475             :  *     else:
   16476             :  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
   16477             :  */
   16478           0 :     (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));
   16479             : 
   16480             :     /* "View.MemoryView":1237
   16481             :  *             tmpslice.strides[i] = 0
   16482             :  * 
   16483             :  *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
   16484             :  *         memcpy(result, src.data, size)
   16485             :  *     else:
   16486             :  */
   16487           0 :     goto __pyx_L9;
   16488             :   }
   16489             : 
   16490             :   /* "View.MemoryView":1240
   16491             :  *         memcpy(result, src.data, size)
   16492             :  *     else:
   16493             :  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)             # <<<<<<<<<<<<<<
   16494             :  * 
   16495             :  *     return result
   16496             :  */
   16497             :   /*else*/ {
   16498           0 :     copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
   16499             :   }
   16500           0 :   __pyx_L9:;
   16501             : 
   16502             :   /* "View.MemoryView":1242
   16503             :  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
   16504             :  * 
   16505             :  *     return result             # <<<<<<<<<<<<<<
   16506             :  * 
   16507             :  * 
   16508             :  */
   16509           0 :   __pyx_r = __pyx_v_result;
   16510           0 :   goto __pyx_L0;
   16511             : 
   16512             :   /* "View.MemoryView":1205
   16513             :  * 
   16514             :  * @cname('__pyx_memoryview_copy_data_to_temp')
   16515             :  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
   16516             :  *                              __Pyx_memviewslice *tmpslice,
   16517             :  *                              char order,
   16518             :  */
   16519             : 
   16520             :   /* function exit code */
   16521           0 :   __pyx_L1_error:;
   16522             :   #ifdef WITH_THREAD
   16523           0 :   __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   16524             :   #endif
   16525           0 :   __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
   16526           0 :   __pyx_r = NULL;
   16527             :   #ifdef WITH_THREAD
   16528           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   16529             :   #endif
   16530           0 :   __pyx_L0:;
   16531           0 :   return __pyx_r;
   16532             : }
   16533             : 
   16534             : /* "View.MemoryView":1247
   16535             :  * 
   16536             :  * @cname('__pyx_memoryview_err_extents')
   16537             :  * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
   16538             :  *                              Py_ssize_t extent2) except -1 with gil:
   16539             :  *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"
   16540             :  */
   16541             : 
   16542           0 : static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
   16543           0 :   int __pyx_r;
   16544             :   __Pyx_RefNannyDeclarations
   16545           0 :   PyObject *__pyx_t_1 = NULL;
   16546           0 :   Py_ssize_t __pyx_t_2;
   16547           0 :   Py_UCS4 __pyx_t_3;
   16548           0 :   PyObject *__pyx_t_4 = NULL;
   16549           0 :   int __pyx_lineno = 0;
   16550           0 :   const char *__pyx_filename = NULL;
   16551           0 :   int __pyx_clineno = 0;
   16552             :   #ifdef WITH_THREAD
   16553           0 :   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   16554             :   #endif
   16555           0 :   __Pyx_RefNannySetupContext("_err_extents", 0);
   16556             : 
   16557             :   /* "View.MemoryView":1249
   16558             :  * cdef int _err_extents(int i, Py_ssize_t extent1,
   16559             :  *                              Py_ssize_t extent2) except -1 with gil:
   16560             :  *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"             # <<<<<<<<<<<<<<
   16561             :  * 
   16562             :  * @cname('__pyx_memoryview_err_dim')
   16563             :  */
   16564           0 :   __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1249, __pyx_L1_error)
   16565           0 :   __Pyx_GOTREF(__pyx_t_1);
   16566           0 :   __pyx_t_2 = 0;
   16567           0 :   __pyx_t_3 = 127;
   16568           0 :   __Pyx_INCREF(__pyx_kp_u_got_differing_extents_in_dimensi);
   16569           0 :   __pyx_t_2 += 35;
   16570           0 :   __Pyx_GIVEREF(__pyx_kp_u_got_differing_extents_in_dimensi);
   16571           0 :   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_got_differing_extents_in_dimensi);
   16572           0 :   __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
   16573           0 :   __Pyx_GOTREF(__pyx_t_4);
   16574           0 :   __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
   16575           0 :   __Pyx_GIVEREF(__pyx_t_4);
   16576           0 :   PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
   16577           0 :   __pyx_t_4 = 0;
   16578           0 :   __Pyx_INCREF(__pyx_kp_u_got);
   16579           0 :   __pyx_t_2 += 6;
   16580           0 :   __Pyx_GIVEREF(__pyx_kp_u_got);
   16581           0 :   PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_got);
   16582           0 :   __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent1, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
   16583           0 :   __Pyx_GOTREF(__pyx_t_4);
   16584           0 :   __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
   16585           0 :   __Pyx_GIVEREF(__pyx_t_4);
   16586           0 :   PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
   16587           0 :   __pyx_t_4 = 0;
   16588           0 :   __Pyx_INCREF(__pyx_kp_u_and);
   16589           0 :   __pyx_t_2 += 5;
   16590           0 :   __Pyx_GIVEREF(__pyx_kp_u_and);
   16591           0 :   PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_and);
   16592           0 :   __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent2, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
   16593           0 :   __Pyx_GOTREF(__pyx_t_4);
   16594           0 :   __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
   16595           0 :   __Pyx_GIVEREF(__pyx_t_4);
   16596           0 :   PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4);
   16597           0 :   __pyx_t_4 = 0;
   16598           0 :   __Pyx_INCREF(__pyx_kp_u__7);
   16599           0 :   __pyx_t_2 += 1;
   16600           0 :   __Pyx_GIVEREF(__pyx_kp_u__7);
   16601           0 :   PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__7);
   16602           0 :   __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
   16603           0 :   __Pyx_GOTREF(__pyx_t_4);
   16604           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   16605           0 :   __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_4, 0, 0);
   16606           0 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   16607           0 :   __PYX_ERR(1, 1249, __pyx_L1_error)
   16608             : 
   16609             :   /* "View.MemoryView":1247
   16610             :  * 
   16611             :  * @cname('__pyx_memoryview_err_extents')
   16612             :  * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
   16613             :  *                              Py_ssize_t extent2) except -1 with gil:
   16614             :  *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"
   16615             :  */
   16616             : 
   16617             :   /* function exit code */
   16618           0 :   __pyx_L1_error:;
   16619           0 :   __Pyx_XDECREF(__pyx_t_1);
   16620           0 :   __Pyx_XDECREF(__pyx_t_4);
   16621           0 :   __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
   16622           0 :   __pyx_r = -1;
   16623           0 :   __Pyx_RefNannyFinishContext();
   16624             :   #ifdef WITH_THREAD
   16625           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   16626             :   #endif
   16627           0 :   return __pyx_r;
   16628             : }
   16629             : 
   16630             : /* "View.MemoryView":1252
   16631             :  * 
   16632             :  * @cname('__pyx_memoryview_err_dim')
   16633             :  * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
   16634             :  *     raise <object>error, msg % dim
   16635             :  * 
   16636             :  */
   16637             : 
   16638           0 : static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, PyObject *__pyx_v_msg, int __pyx_v_dim) {
   16639           0 :   int __pyx_r;
   16640             :   __Pyx_RefNannyDeclarations
   16641           0 :   PyObject *__pyx_t_1 = NULL;
   16642           0 :   PyObject *__pyx_t_2 = NULL;
   16643           0 :   int __pyx_lineno = 0;
   16644           0 :   const char *__pyx_filename = NULL;
   16645           0 :   int __pyx_clineno = 0;
   16646             :   #ifdef WITH_THREAD
   16647           0 :   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   16648             :   #endif
   16649           0 :   __Pyx_RefNannySetupContext("_err_dim", 0);
   16650           0 :   __Pyx_INCREF(__pyx_v_msg);
   16651             : 
   16652             :   /* "View.MemoryView":1253
   16653             :  * @cname('__pyx_memoryview_err_dim')
   16654             :  * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:
   16655             :  *     raise <object>error, msg % dim             # <<<<<<<<<<<<<<
   16656             :  * 
   16657             :  * @cname('__pyx_memoryview_err')
   16658             :  */
   16659           0 :   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1253, __pyx_L1_error)
   16660           0 :   __Pyx_GOTREF(__pyx_t_1);
   16661           0 :   __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_v_msg, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1253, __pyx_L1_error)
   16662           0 :   __Pyx_GOTREF(__pyx_t_2);
   16663           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   16664           0 :   __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_t_2, 0, 0);
   16665           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   16666           0 :   __PYX_ERR(1, 1253, __pyx_L1_error)
   16667             : 
   16668             :   /* "View.MemoryView":1252
   16669             :  * 
   16670             :  * @cname('__pyx_memoryview_err_dim')
   16671             :  * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
   16672             :  *     raise <object>error, msg % dim
   16673             :  * 
   16674             :  */
   16675             : 
   16676             :   /* function exit code */
   16677           0 :   __pyx_L1_error:;
   16678           0 :   __Pyx_XDECREF(__pyx_t_1);
   16679           0 :   __Pyx_XDECREF(__pyx_t_2);
   16680           0 :   __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
   16681           0 :   __pyx_r = -1;
   16682           0 :   __Pyx_XDECREF(__pyx_v_msg);
   16683           0 :   __Pyx_RefNannyFinishContext();
   16684             :   #ifdef WITH_THREAD
   16685           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   16686             :   #endif
   16687           0 :   return __pyx_r;
   16688             : }
   16689             : 
   16690             : /* "View.MemoryView":1256
   16691             :  * 
   16692             :  * @cname('__pyx_memoryview_err')
   16693             :  * cdef int _err(PyObject *error, str msg) except -1 with gil:             # <<<<<<<<<<<<<<
   16694             :  *     raise <object>error, msg
   16695             :  * 
   16696             :  */
   16697             : 
   16698           0 : static int __pyx_memoryview_err(PyObject *__pyx_v_error, PyObject *__pyx_v_msg) {
   16699           0 :   int __pyx_r;
   16700             :   __Pyx_RefNannyDeclarations
   16701           0 :   int __pyx_lineno = 0;
   16702           0 :   const char *__pyx_filename = NULL;
   16703           0 :   int __pyx_clineno = 0;
   16704             :   #ifdef WITH_THREAD
   16705           0 :   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   16706             :   #endif
   16707           0 :   __Pyx_RefNannySetupContext("_err", 0);
   16708           0 :   __Pyx_INCREF(__pyx_v_msg);
   16709             : 
   16710             :   /* "View.MemoryView":1257
   16711             :  * @cname('__pyx_memoryview_err')
   16712             :  * cdef int _err(PyObject *error, str msg) except -1 with gil:
   16713             :  *     raise <object>error, msg             # <<<<<<<<<<<<<<
   16714             :  * 
   16715             :  * @cname('__pyx_memoryview_err_no_memory')
   16716             :  */
   16717           0 :   __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_v_msg, 0, 0);
   16718           0 :   __PYX_ERR(1, 1257, __pyx_L1_error)
   16719             : 
   16720             :   /* "View.MemoryView":1256
   16721             :  * 
   16722             :  * @cname('__pyx_memoryview_err')
   16723             :  * cdef int _err(PyObject *error, str msg) except -1 with gil:             # <<<<<<<<<<<<<<
   16724             :  *     raise <object>error, msg
   16725             :  * 
   16726             :  */
   16727             : 
   16728             :   /* function exit code */
   16729           0 :   __pyx_L1_error:;
   16730           0 :   __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
   16731           0 :   __pyx_r = -1;
   16732           0 :   __Pyx_XDECREF(__pyx_v_msg);
   16733           0 :   __Pyx_RefNannyFinishContext();
   16734             :   #ifdef WITH_THREAD
   16735           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   16736             :   #endif
   16737           0 :   return __pyx_r;
   16738             : }
   16739             : 
   16740             : /* "View.MemoryView":1260
   16741             :  * 
   16742             :  * @cname('__pyx_memoryview_err_no_memory')
   16743             :  * cdef int _err_no_memory() except -1 with gil:             # <<<<<<<<<<<<<<
   16744             :  *     raise MemoryError
   16745             :  * 
   16746             :  */
   16747             : 
   16748           0 : static int __pyx_memoryview_err_no_memory(void) {
   16749           0 :   int __pyx_r;
   16750           0 :   int __pyx_lineno = 0;
   16751           0 :   const char *__pyx_filename = NULL;
   16752           0 :   int __pyx_clineno = 0;
   16753             :   #ifdef WITH_THREAD
   16754           0 :   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   16755             :   #endif
   16756             : 
   16757             :   /* "View.MemoryView":1261
   16758             :  * @cname('__pyx_memoryview_err_no_memory')
   16759             :  * cdef int _err_no_memory() except -1 with gil:
   16760             :  *     raise MemoryError             # <<<<<<<<<<<<<<
   16761             :  * 
   16762             :  * 
   16763             :  */
   16764           0 :   PyErr_NoMemory(); __PYX_ERR(1, 1261, __pyx_L1_error)
   16765             : 
   16766             :   /* "View.MemoryView":1260
   16767             :  * 
   16768             :  * @cname('__pyx_memoryview_err_no_memory')
   16769             :  * cdef int _err_no_memory() except -1 with gil:             # <<<<<<<<<<<<<<
   16770             :  *     raise MemoryError
   16771             :  * 
   16772             :  */
   16773             : 
   16774             :   /* function exit code */
   16775           0 :   __pyx_L1_error:;
   16776           0 :   __Pyx_AddTraceback("View.MemoryView._err_no_memory", __pyx_clineno, __pyx_lineno, __pyx_filename);
   16777           0 :   __pyx_r = -1;
   16778             :   #ifdef WITH_THREAD
   16779           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   16780             :   #endif
   16781           0 :   return __pyx_r;
   16782             : }
   16783             : 
   16784             : /* "View.MemoryView":1265
   16785             :  * 
   16786             :  * @cname('__pyx_memoryview_copy_contents')
   16787             :  * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
   16788             :  *                                   __Pyx_memviewslice dst,
   16789             :  *                                   int src_ndim, int dst_ndim,
   16790             :  */
   16791             : 
   16792           0 : static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {
   16793           0 :   void *__pyx_v_tmpdata;
   16794           0 :   size_t __pyx_v_itemsize;
   16795           0 :   int __pyx_v_i;
   16796           0 :   char __pyx_v_order;
   16797           0 :   int __pyx_v_broadcasting;
   16798           0 :   int __pyx_v_direct_copy;
   16799           0 :   __Pyx_memviewslice __pyx_v_tmp;
   16800           0 :   int __pyx_v_ndim;
   16801           0 :   int __pyx_r;
   16802           0 :   Py_ssize_t __pyx_t_1;
   16803           0 :   int __pyx_t_2;
   16804           0 :   int __pyx_t_3;
   16805           0 :   int __pyx_t_4;
   16806           0 :   int __pyx_t_5;
   16807           0 :   int __pyx_t_6;
   16808           0 :   void *__pyx_t_7;
   16809           0 :   int __pyx_lineno = 0;
   16810           0 :   const char *__pyx_filename = NULL;
   16811           0 :   int __pyx_clineno = 0;
   16812             :   #ifdef WITH_THREAD
   16813           0 :   PyGILState_STATE __pyx_gilstate_save;
   16814             :   #endif
   16815             : 
   16816             :   /* "View.MemoryView":1273
   16817             :  *     Check for overlapping memory and verify the shapes.
   16818             :  *     """
   16819             :  *     cdef void *tmpdata = NULL             # <<<<<<<<<<<<<<
   16820             :  *     cdef size_t itemsize = src.memview.view.itemsize
   16821             :  *     cdef int i
   16822             :  */
   16823           0 :   __pyx_v_tmpdata = NULL;
   16824             : 
   16825             :   /* "View.MemoryView":1274
   16826             :  *     """
   16827             :  *     cdef void *tmpdata = NULL
   16828             :  *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
   16829             :  *     cdef int i
   16830             :  *     cdef char order = get_best_order(&src, src_ndim)
   16831             :  */
   16832           0 :   __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
   16833           0 :   __pyx_v_itemsize = __pyx_t_1;
   16834             : 
   16835             :   /* "View.MemoryView":1276
   16836             :  *     cdef size_t itemsize = src.memview.view.itemsize
   16837             :  *     cdef int i
   16838             :  *     cdef char order = get_best_order(&src, src_ndim)             # <<<<<<<<<<<<<<
   16839             :  *     cdef bint broadcasting = False
   16840             :  *     cdef bint direct_copy = False
   16841             :  */
   16842           0 :   __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);
   16843             : 
   16844             :   /* "View.MemoryView":1277
   16845             :  *     cdef int i
   16846             :  *     cdef char order = get_best_order(&src, src_ndim)
   16847             :  *     cdef bint broadcasting = False             # <<<<<<<<<<<<<<
   16848             :  *     cdef bint direct_copy = False
   16849             :  *     cdef __Pyx_memviewslice tmp
   16850             :  */
   16851           0 :   __pyx_v_broadcasting = 0;
   16852             : 
   16853             :   /* "View.MemoryView":1278
   16854             :  *     cdef char order = get_best_order(&src, src_ndim)
   16855             :  *     cdef bint broadcasting = False
   16856             :  *     cdef bint direct_copy = False             # <<<<<<<<<<<<<<
   16857             :  *     cdef __Pyx_memviewslice tmp
   16858             :  * 
   16859             :  */
   16860           0 :   __pyx_v_direct_copy = 0;
   16861             : 
   16862             :   /* "View.MemoryView":1281
   16863             :  *     cdef __Pyx_memviewslice tmp
   16864             :  * 
   16865             :  *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
   16866             :  *         broadcast_leading(&src, src_ndim, dst_ndim)
   16867             :  *     elif dst_ndim < src_ndim:
   16868             :  */
   16869           0 :   __pyx_t_2 = (__pyx_v_src_ndim < __pyx_v_dst_ndim);
   16870           0 :   if (__pyx_t_2) {
   16871             : 
   16872             :     /* "View.MemoryView":1282
   16873             :  * 
   16874             :  *     if src_ndim < dst_ndim:
   16875             :  *         broadcast_leading(&src, src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
   16876             :  *     elif dst_ndim < src_ndim:
   16877             :  *         broadcast_leading(&dst, dst_ndim, src_ndim)
   16878             :  */
   16879           0 :     __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);
   16880             : 
   16881             :     /* "View.MemoryView":1281
   16882             :  *     cdef __Pyx_memviewslice tmp
   16883             :  * 
   16884             :  *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
   16885             :  *         broadcast_leading(&src, src_ndim, dst_ndim)
   16886             :  *     elif dst_ndim < src_ndim:
   16887             :  */
   16888           0 :     goto __pyx_L3;
   16889             :   }
   16890             : 
   16891             :   /* "View.MemoryView":1283
   16892             :  *     if src_ndim < dst_ndim:
   16893             :  *         broadcast_leading(&src, src_ndim, dst_ndim)
   16894             :  *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
   16895             :  *         broadcast_leading(&dst, dst_ndim, src_ndim)
   16896             :  * 
   16897             :  */
   16898           0 :   __pyx_t_2 = (__pyx_v_dst_ndim < __pyx_v_src_ndim);
   16899           0 :   if (__pyx_t_2) {
   16900             : 
   16901             :     /* "View.MemoryView":1284
   16902             :  *         broadcast_leading(&src, src_ndim, dst_ndim)
   16903             :  *     elif dst_ndim < src_ndim:
   16904             :  *         broadcast_leading(&dst, dst_ndim, src_ndim)             # <<<<<<<<<<<<<<
   16905             :  * 
   16906             :  *     cdef int ndim = max(src_ndim, dst_ndim)
   16907             :  */
   16908           0 :     __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);
   16909             : 
   16910             :     /* "View.MemoryView":1283
   16911             :  *     if src_ndim < dst_ndim:
   16912             :  *         broadcast_leading(&src, src_ndim, dst_ndim)
   16913             :  *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
   16914             :  *         broadcast_leading(&dst, dst_ndim, src_ndim)
   16915             :  * 
   16916             :  */
   16917             :   }
   16918           0 :   __pyx_L3:;
   16919             : 
   16920             :   /* "View.MemoryView":1286
   16921             :  *         broadcast_leading(&dst, dst_ndim, src_ndim)
   16922             :  * 
   16923             :  *     cdef int ndim = max(src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
   16924             :  * 
   16925             :  *     for i in range(ndim):
   16926             :  */
   16927           0 :   __pyx_t_3 = __pyx_v_dst_ndim;
   16928           0 :   __pyx_t_4 = __pyx_v_src_ndim;
   16929           0 :   __pyx_t_2 = (__pyx_t_3 > __pyx_t_4);
   16930           0 :   if (__pyx_t_2) {
   16931             :     __pyx_t_5 = __pyx_t_3;
   16932             :   } else {
   16933             :     __pyx_t_5 = __pyx_t_4;
   16934             :   }
   16935           0 :   __pyx_v_ndim = __pyx_t_5;
   16936             : 
   16937             :   /* "View.MemoryView":1288
   16938             :  *     cdef int ndim = max(src_ndim, dst_ndim)
   16939             :  * 
   16940             :  *     for i in range(ndim):             # <<<<<<<<<<<<<<
   16941             :  *         if src.shape[i] != dst.shape[i]:
   16942             :  *             if src.shape[i] == 1:
   16943             :  */
   16944           0 :   __pyx_t_5 = __pyx_v_ndim;
   16945           0 :   __pyx_t_3 = __pyx_t_5;
   16946           0 :   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   16947           0 :     __pyx_v_i = __pyx_t_4;
   16948             : 
   16949             :     /* "View.MemoryView":1289
   16950             :  * 
   16951             :  *     for i in range(ndim):
   16952             :  *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
   16953             :  *             if src.shape[i] == 1:
   16954             :  *                 broadcasting = True
   16955             :  */
   16956           0 :     __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i]));
   16957           0 :     if (__pyx_t_2) {
   16958             : 
   16959             :       /* "View.MemoryView":1290
   16960             :  *     for i in range(ndim):
   16961             :  *         if src.shape[i] != dst.shape[i]:
   16962             :  *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
   16963             :  *                 broadcasting = True
   16964             :  *                 src.strides[i] = 0
   16965             :  */
   16966           0 :       __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) == 1);
   16967           0 :       if (__pyx_t_2) {
   16968             : 
   16969             :         /* "View.MemoryView":1291
   16970             :  *         if src.shape[i] != dst.shape[i]:
   16971             :  *             if src.shape[i] == 1:
   16972             :  *                 broadcasting = True             # <<<<<<<<<<<<<<
   16973             :  *                 src.strides[i] = 0
   16974             :  *             else:
   16975             :  */
   16976           0 :         __pyx_v_broadcasting = 1;
   16977             : 
   16978             :         /* "View.MemoryView":1292
   16979             :  *             if src.shape[i] == 1:
   16980             :  *                 broadcasting = True
   16981             :  *                 src.strides[i] = 0             # <<<<<<<<<<<<<<
   16982             :  *             else:
   16983             :  *                 _err_extents(i, dst.shape[i], src.shape[i])
   16984             :  */
   16985           0 :         (__pyx_v_src.strides[__pyx_v_i]) = 0;
   16986             : 
   16987             :         /* "View.MemoryView":1290
   16988             :  *     for i in range(ndim):
   16989             :  *         if src.shape[i] != dst.shape[i]:
   16990             :  *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
   16991             :  *                 broadcasting = True
   16992             :  *                 src.strides[i] = 0
   16993             :  */
   16994           0 :         goto __pyx_L7;
   16995             :       }
   16996             : 
   16997             :       /* "View.MemoryView":1294
   16998             :  *                 src.strides[i] = 0
   16999             :  *             else:
   17000             :  *                 _err_extents(i, dst.shape[i], src.shape[i])             # <<<<<<<<<<<<<<
   17001             :  * 
   17002             :  *         if src.suboffsets[i] >= 0:
   17003             :  */
   17004             :       /*else*/ {
   17005           0 :         __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1294, __pyx_L1_error)
   17006             :       }
   17007           0 :       __pyx_L7:;
   17008             : 
   17009             :       /* "View.MemoryView":1289
   17010             :  * 
   17011             :  *     for i in range(ndim):
   17012             :  *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
   17013             :  *             if src.shape[i] == 1:
   17014             :  *                 broadcasting = True
   17015             :  */
   17016             :     }
   17017             : 
   17018             :     /* "View.MemoryView":1296
   17019             :  *                 _err_extents(i, dst.shape[i], src.shape[i])
   17020             :  * 
   17021             :  *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
   17022             :  *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
   17023             :  * 
   17024             :  */
   17025           0 :     __pyx_t_2 = ((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0);
   17026           0 :     if (__pyx_t_2) {
   17027             : 
   17028             :       /* "View.MemoryView":1297
   17029             :  * 
   17030             :  *         if src.suboffsets[i] >= 0:
   17031             :  *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)             # <<<<<<<<<<<<<<
   17032             :  * 
   17033             :  *     if slices_overlap(&src, &dst, ndim, itemsize):
   17034             :  */
   17035           0 :       __pyx_t_6 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_kp_s_Dimension_d_is_not_direct, __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1297, __pyx_L1_error)
   17036             : 
   17037             :       /* "View.MemoryView":1296
   17038             :  *                 _err_extents(i, dst.shape[i], src.shape[i])
   17039             :  * 
   17040             :  *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
   17041             :  *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
   17042             :  * 
   17043             :  */
   17044             :     }
   17045             :   }
   17046             : 
   17047             :   /* "View.MemoryView":1299
   17048             :  *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
   17049             :  * 
   17050             :  *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
   17051             :  * 
   17052             :  *         if not slice_is_contig(src, order, ndim):
   17053             :  */
   17054           0 :   __pyx_t_2 = __pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
   17055           0 :   if (__pyx_t_2) {
   17056             : 
   17057             :     /* "View.MemoryView":1301
   17058             :  *     if slices_overlap(&src, &dst, ndim, itemsize):
   17059             :  * 
   17060             :  *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
   17061             :  *             order = get_best_order(&dst, ndim)
   17062             :  * 
   17063             :  */
   17064           0 :     __pyx_t_2 = (!__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim));
   17065           0 :     if (__pyx_t_2) {
   17066             : 
   17067             :       /* "View.MemoryView":1302
   17068             :  * 
   17069             :  *         if not slice_is_contig(src, order, ndim):
   17070             :  *             order = get_best_order(&dst, ndim)             # <<<<<<<<<<<<<<
   17071             :  * 
   17072             :  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
   17073             :  */
   17074           0 :       __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);
   17075             : 
   17076             :       /* "View.MemoryView":1301
   17077             :  *     if slices_overlap(&src, &dst, ndim, itemsize):
   17078             :  * 
   17079             :  *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
   17080             :  *             order = get_best_order(&dst, ndim)
   17081             :  * 
   17082             :  */
   17083             :     }
   17084             : 
   17085             :     /* "View.MemoryView":1304
   17086             :  *             order = get_best_order(&dst, ndim)
   17087             :  * 
   17088             :  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)             # <<<<<<<<<<<<<<
   17089             :  *         src = tmp
   17090             :  * 
   17091             :  */
   17092           0 :     __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 1304, __pyx_L1_error)
   17093           0 :     __pyx_v_tmpdata = __pyx_t_7;
   17094             : 
   17095             :     /* "View.MemoryView":1305
   17096             :  * 
   17097             :  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
   17098             :  *         src = tmp             # <<<<<<<<<<<<<<
   17099             :  * 
   17100             :  *     if not broadcasting:
   17101             :  */
   17102           0 :     __pyx_v_src = __pyx_v_tmp;
   17103             : 
   17104             :     /* "View.MemoryView":1299
   17105             :  *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
   17106             :  * 
   17107             :  *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
   17108             :  * 
   17109             :  *         if not slice_is_contig(src, order, ndim):
   17110             :  */
   17111             :   }
   17112             : 
   17113             :   /* "View.MemoryView":1307
   17114             :  *         src = tmp
   17115             :  * 
   17116             :  *     if not broadcasting:             # <<<<<<<<<<<<<<
   17117             :  * 
   17118             :  * 
   17119             :  */
   17120           0 :   __pyx_t_2 = (!__pyx_v_broadcasting);
   17121           0 :   if (__pyx_t_2) {
   17122             : 
   17123             :     /* "View.MemoryView":1310
   17124             :  * 
   17125             :  * 
   17126             :  *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
   17127             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)
   17128             :  *         elif slice_is_contig(src, 'F', ndim):
   17129             :  */
   17130           0 :     __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim);
   17131           0 :     if (__pyx_t_2) {
   17132             : 
   17133             :       /* "View.MemoryView":1311
   17134             :  * 
   17135             :  *         if slice_is_contig(src, 'C', ndim):
   17136             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)             # <<<<<<<<<<<<<<
   17137             :  *         elif slice_is_contig(src, 'F', ndim):
   17138             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)
   17139             :  */
   17140           0 :       __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);
   17141             : 
   17142             :       /* "View.MemoryView":1310
   17143             :  * 
   17144             :  * 
   17145             :  *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
   17146             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)
   17147             :  *         elif slice_is_contig(src, 'F', ndim):
   17148             :  */
   17149           0 :       goto __pyx_L12;
   17150             :     }
   17151             : 
   17152             :     /* "View.MemoryView":1312
   17153             :  *         if slice_is_contig(src, 'C', ndim):
   17154             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)
   17155             :  *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
   17156             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)
   17157             :  * 
   17158             :  */
   17159           0 :     __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim);
   17160           0 :     if (__pyx_t_2) {
   17161             : 
   17162             :       /* "View.MemoryView":1313
   17163             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)
   17164             :  *         elif slice_is_contig(src, 'F', ndim):
   17165             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)             # <<<<<<<<<<<<<<
   17166             :  * 
   17167             :  *         if direct_copy:
   17168             :  */
   17169           0 :       __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);
   17170             : 
   17171             :       /* "View.MemoryView":1312
   17172             :  *         if slice_is_contig(src, 'C', ndim):
   17173             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)
   17174             :  *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
   17175             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)
   17176             :  * 
   17177             :  */
   17178             :     }
   17179           0 :     __pyx_L12:;
   17180             : 
   17181             :     /* "View.MemoryView":1315
   17182             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)
   17183             :  * 
   17184             :  *         if direct_copy:             # <<<<<<<<<<<<<<
   17185             :  * 
   17186             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17187             :  */
   17188           0 :     if (__pyx_v_direct_copy) {
   17189             : 
   17190             :       /* "View.MemoryView":1317
   17191             :  *         if direct_copy:
   17192             :  * 
   17193             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
   17194             :  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
   17195             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17196             :  */
   17197           0 :       __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
   17198             : 
   17199             :       /* "View.MemoryView":1318
   17200             :  * 
   17201             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17202             :  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))             # <<<<<<<<<<<<<<
   17203             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17204             :  *             free(tmpdata)
   17205             :  */
   17206           0 :       (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));
   17207             : 
   17208             :       /* "View.MemoryView":1319
   17209             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17210             :  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
   17211             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
   17212             :  *             free(tmpdata)
   17213             :  *             return 0
   17214             :  */
   17215           0 :       __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
   17216             : 
   17217             :       /* "View.MemoryView":1320
   17218             :  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
   17219             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17220             :  *             free(tmpdata)             # <<<<<<<<<<<<<<
   17221             :  *             return 0
   17222             :  * 
   17223             :  */
   17224           0 :       free(__pyx_v_tmpdata);
   17225             : 
   17226             :       /* "View.MemoryView":1321
   17227             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17228             :  *             free(tmpdata)
   17229             :  *             return 0             # <<<<<<<<<<<<<<
   17230             :  * 
   17231             :  *     if order == 'F' == get_best_order(&dst, ndim):
   17232             :  */
   17233           0 :       __pyx_r = 0;
   17234           0 :       goto __pyx_L0;
   17235             : 
   17236             :       /* "View.MemoryView":1315
   17237             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)
   17238             :  * 
   17239             :  *         if direct_copy:             # <<<<<<<<<<<<<<
   17240             :  * 
   17241             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17242             :  */
   17243             :     }
   17244             : 
   17245             :     /* "View.MemoryView":1307
   17246             :  *         src = tmp
   17247             :  * 
   17248             :  *     if not broadcasting:             # <<<<<<<<<<<<<<
   17249             :  * 
   17250             :  * 
   17251             :  */
   17252             :   }
   17253             : 
   17254             :   /* "View.MemoryView":1323
   17255             :  *             return 0
   17256             :  * 
   17257             :  *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
   17258             :  * 
   17259             :  * 
   17260             :  */
   17261           0 :   __pyx_t_2 = (__pyx_v_order == 'F');
   17262           0 :   if (__pyx_t_2) {
   17263           0 :     __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
   17264             :   }
   17265           0 :   if (__pyx_t_2) {
   17266             : 
   17267             :     /* "View.MemoryView":1326
   17268             :  * 
   17269             :  * 
   17270             :  *         transpose_memslice(&src)             # <<<<<<<<<<<<<<
   17271             :  *         transpose_memslice(&dst)
   17272             :  * 
   17273             :  */
   17274           0 :     __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1326, __pyx_L1_error)
   17275             : 
   17276             :     /* "View.MemoryView":1327
   17277             :  * 
   17278             :  *         transpose_memslice(&src)
   17279             :  *         transpose_memslice(&dst)             # <<<<<<<<<<<<<<
   17280             :  * 
   17281             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17282             :  */
   17283           0 :     __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1327, __pyx_L1_error)
   17284             : 
   17285             :     /* "View.MemoryView":1323
   17286             :  *             return 0
   17287             :  * 
   17288             :  *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
   17289             :  * 
   17290             :  * 
   17291             :  */
   17292             :   }
   17293             : 
   17294             :   /* "View.MemoryView":1329
   17295             :  *         transpose_memslice(&dst)
   17296             :  * 
   17297             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
   17298             :  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
   17299             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17300             :  */
   17301           0 :   __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
   17302             : 
   17303             :   /* "View.MemoryView":1330
   17304             :  * 
   17305             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17306             :  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)             # <<<<<<<<<<<<<<
   17307             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17308             :  * 
   17309             :  */
   17310           0 :   copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
   17311             : 
   17312             :   /* "View.MemoryView":1331
   17313             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17314             :  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
   17315             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
   17316             :  * 
   17317             :  *     free(tmpdata)
   17318             :  */
   17319           0 :   __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
   17320             : 
   17321             :   /* "View.MemoryView":1333
   17322             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17323             :  * 
   17324             :  *     free(tmpdata)             # <<<<<<<<<<<<<<
   17325             :  *     return 0
   17326             :  * 
   17327             :  */
   17328           0 :   free(__pyx_v_tmpdata);
   17329             : 
   17330             :   /* "View.MemoryView":1334
   17331             :  * 
   17332             :  *     free(tmpdata)
   17333             :  *     return 0             # <<<<<<<<<<<<<<
   17334             :  * 
   17335             :  * @cname('__pyx_memoryview_broadcast_leading')
   17336             :  */
   17337           0 :   __pyx_r = 0;
   17338           0 :   goto __pyx_L0;
   17339             : 
   17340             :   /* "View.MemoryView":1265
   17341             :  * 
   17342             :  * @cname('__pyx_memoryview_copy_contents')
   17343             :  * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
   17344             :  *                                   __Pyx_memviewslice dst,
   17345             :  *                                   int src_ndim, int dst_ndim,
   17346             :  */
   17347             : 
   17348             :   /* function exit code */
   17349           0 :   __pyx_L1_error:;
   17350             :   #ifdef WITH_THREAD
   17351           0 :   __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   17352             :   #endif
   17353           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
   17354           0 :   __pyx_r = -1;
   17355             :   #ifdef WITH_THREAD
   17356           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   17357             :   #endif
   17358           0 :   __pyx_L0:;
   17359           0 :   return __pyx_r;
   17360             : }
   17361             : 
   17362             : /* "View.MemoryView":1337
   17363             :  * 
   17364             :  * @cname('__pyx_memoryview_broadcast_leading')
   17365             :  * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
   17366             :  *                             int ndim,
   17367             :  *                             int ndim_other) noexcept nogil:
   17368             :  */
   17369             : 
   17370           0 : static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
   17371           0 :   int __pyx_v_i;
   17372           0 :   int __pyx_v_offset;
   17373           0 :   int __pyx_t_1;
   17374           0 :   int __pyx_t_2;
   17375           0 :   int __pyx_t_3;
   17376             : 
   17377             :   /* "View.MemoryView":1341
   17378             :  *                             int ndim_other) noexcept nogil:
   17379             :  *     cdef int i
   17380             :  *     cdef int offset = ndim_other - ndim             # <<<<<<<<<<<<<<
   17381             :  * 
   17382             :  *     for i in range(ndim - 1, -1, -1):
   17383             :  */
   17384           0 :   __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);
   17385             : 
   17386             :   /* "View.MemoryView":1343
   17387             :  *     cdef int offset = ndim_other - ndim
   17388             :  * 
   17389             :  *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
   17390             :  *         mslice.shape[i + offset] = mslice.shape[i]
   17391             :  *         mslice.strides[i + offset] = mslice.strides[i]
   17392             :  */
   17393           0 :   for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
   17394           0 :     __pyx_v_i = __pyx_t_1;
   17395             : 
   17396             :     /* "View.MemoryView":1344
   17397             :  * 
   17398             :  *     for i in range(ndim - 1, -1, -1):
   17399             :  *         mslice.shape[i + offset] = mslice.shape[i]             # <<<<<<<<<<<<<<
   17400             :  *         mslice.strides[i + offset] = mslice.strides[i]
   17401             :  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
   17402             :  */
   17403           0 :     (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);
   17404             : 
   17405             :     /* "View.MemoryView":1345
   17406             :  *     for i in range(ndim - 1, -1, -1):
   17407             :  *         mslice.shape[i + offset] = mslice.shape[i]
   17408             :  *         mslice.strides[i + offset] = mslice.strides[i]             # <<<<<<<<<<<<<<
   17409             :  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
   17410             :  * 
   17411             :  */
   17412           0 :     (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);
   17413             : 
   17414             :     /* "View.MemoryView":1346
   17415             :  *         mslice.shape[i + offset] = mslice.shape[i]
   17416             :  *         mslice.strides[i + offset] = mslice.strides[i]
   17417             :  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]             # <<<<<<<<<<<<<<
   17418             :  * 
   17419             :  *     for i in range(offset):
   17420             :  */
   17421           0 :     (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
   17422             :   }
   17423             : 
   17424             :   /* "View.MemoryView":1348
   17425             :  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
   17426             :  * 
   17427             :  *     for i in range(offset):             # <<<<<<<<<<<<<<
   17428             :  *         mslice.shape[i] = 1
   17429             :  *         mslice.strides[i] = mslice.strides[0]
   17430             :  */
   17431           0 :   __pyx_t_1 = __pyx_v_offset;
   17432             :   __pyx_t_2 = __pyx_t_1;
   17433           0 :   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
   17434           0 :     __pyx_v_i = __pyx_t_3;
   17435             : 
   17436             :     /* "View.MemoryView":1349
   17437             :  * 
   17438             :  *     for i in range(offset):
   17439             :  *         mslice.shape[i] = 1             # <<<<<<<<<<<<<<
   17440             :  *         mslice.strides[i] = mslice.strides[0]
   17441             :  *         mslice.suboffsets[i] = -1
   17442             :  */
   17443           0 :     (__pyx_v_mslice->shape[__pyx_v_i]) = 1;
   17444             : 
   17445             :     /* "View.MemoryView":1350
   17446             :  *     for i in range(offset):
   17447             :  *         mslice.shape[i] = 1
   17448             :  *         mslice.strides[i] = mslice.strides[0]             # <<<<<<<<<<<<<<
   17449             :  *         mslice.suboffsets[i] = -1
   17450             :  * 
   17451             :  */
   17452           0 :     (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);
   17453             : 
   17454             :     /* "View.MemoryView":1351
   17455             :  *         mslice.shape[i] = 1
   17456             :  *         mslice.strides[i] = mslice.strides[0]
   17457             :  *         mslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
   17458             :  * 
   17459             :  * 
   17460             :  */
   17461           0 :     (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
   17462             :   }
   17463             : 
   17464             :   /* "View.MemoryView":1337
   17465             :  * 
   17466             :  * @cname('__pyx_memoryview_broadcast_leading')
   17467             :  * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
   17468             :  *                             int ndim,
   17469             :  *                             int ndim_other) noexcept nogil:
   17470             :  */
   17471             : 
   17472             :   /* function exit code */
   17473           0 : }
   17474             : 
   17475             : /* "View.MemoryView":1359
   17476             :  * 
   17477             :  * @cname('__pyx_memoryview_refcount_copying')
   17478             :  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:             # <<<<<<<<<<<<<<
   17479             :  * 
   17480             :  *     if dtype_is_object:
   17481             :  */
   17482             : 
   17483           0 : static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {
   17484             : 
   17485             :   /* "View.MemoryView":1361
   17486             :  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
   17487             :  * 
   17488             :  *     if dtype_is_object:             # <<<<<<<<<<<<<<
   17489             :  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
   17490             :  * 
   17491             :  */
   17492           0 :   if (__pyx_v_dtype_is_object) {
   17493             : 
   17494             :     /* "View.MemoryView":1362
   17495             :  * 
   17496             :  *     if dtype_is_object:
   17497             :  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)             # <<<<<<<<<<<<<<
   17498             :  * 
   17499             :  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
   17500             :  */
   17501           0 :     __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);
   17502             : 
   17503             :     /* "View.MemoryView":1361
   17504             :  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
   17505             :  * 
   17506             :  *     if dtype_is_object:             # <<<<<<<<<<<<<<
   17507             :  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
   17508             :  * 
   17509             :  */
   17510             :   }
   17511             : 
   17512             :   /* "View.MemoryView":1359
   17513             :  * 
   17514             :  * @cname('__pyx_memoryview_refcount_copying')
   17515             :  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:             # <<<<<<<<<<<<<<
   17516             :  * 
   17517             :  *     if dtype_is_object:
   17518             :  */
   17519             : 
   17520             :   /* function exit code */
   17521           0 : }
   17522             : 
   17523             : /* "View.MemoryView":1365
   17524             :  * 
   17525             :  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
   17526             :  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   17527             :  *                                              Py_ssize_t *strides, int ndim,
   17528             :  *                                              bint inc) noexcept with gil:
   17529             :  */
   17530             : 
   17531           0 : static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
   17532             :   #ifdef WITH_THREAD
   17533           0 :   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   17534             :   #endif
   17535             : 
   17536             :   /* "View.MemoryView":1368
   17537             :  *                                              Py_ssize_t *strides, int ndim,
   17538             :  *                                              bint inc) noexcept with gil:
   17539             :  *     refcount_objects_in_slice(data, shape, strides, ndim, inc)             # <<<<<<<<<<<<<<
   17540             :  * 
   17541             :  * @cname('__pyx_memoryview_refcount_objects_in_slice')
   17542             :  */
   17543           0 :   __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);
   17544             : 
   17545             :   /* "View.MemoryView":1365
   17546             :  * 
   17547             :  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
   17548             :  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   17549             :  *                                              Py_ssize_t *strides, int ndim,
   17550             :  *                                              bint inc) noexcept with gil:
   17551             :  */
   17552             : 
   17553             :   /* function exit code */
   17554             :   #ifdef WITH_THREAD
   17555           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   17556             :   #endif
   17557           0 : }
   17558             : 
   17559             : /* "View.MemoryView":1371
   17560             :  * 
   17561             :  * @cname('__pyx_memoryview_refcount_objects_in_slice')
   17562             :  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   17563             :  *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
   17564             :  *     cdef Py_ssize_t i
   17565             :  */
   17566             : 
   17567           0 : static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
   17568           0 :   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
   17569           0 :   Py_ssize_t __pyx_v_stride;
   17570           0 :   Py_ssize_t __pyx_t_1;
   17571           0 :   Py_ssize_t __pyx_t_2;
   17572           0 :   Py_ssize_t __pyx_t_3;
   17573           0 :   int __pyx_t_4;
   17574             : 
   17575             :   /* "View.MemoryView":1374
   17576             :  *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
   17577             :  *     cdef Py_ssize_t i
   17578             :  *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<
   17579             :  * 
   17580             :  *     for i in range(shape[0]):
   17581             :  */
   17582           0 :   __pyx_v_stride = (__pyx_v_strides[0]);
   17583             : 
   17584             :   /* "View.MemoryView":1376
   17585             :  *     cdef Py_ssize_t stride = strides[0]
   17586             :  * 
   17587             :  *     for i in range(shape[0]):             # <<<<<<<<<<<<<<
   17588             :  *         if ndim == 1:
   17589             :  *             if inc:
   17590             :  */
   17591           0 :   __pyx_t_1 = (__pyx_v_shape[0]);
   17592           0 :   __pyx_t_2 = __pyx_t_1;
   17593           0 :   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
   17594           0 :     __pyx_v_i = __pyx_t_3;
   17595             : 
   17596             :     /* "View.MemoryView":1377
   17597             :  * 
   17598             :  *     for i in range(shape[0]):
   17599             :  *         if ndim == 1:             # <<<<<<<<<<<<<<
   17600             :  *             if inc:
   17601             :  *                 Py_INCREF((<PyObject **> data)[0])
   17602             :  */
   17603           0 :     __pyx_t_4 = (__pyx_v_ndim == 1);
   17604           0 :     if (__pyx_t_4) {
   17605             : 
   17606             :       /* "View.MemoryView":1378
   17607             :  *     for i in range(shape[0]):
   17608             :  *         if ndim == 1:
   17609             :  *             if inc:             # <<<<<<<<<<<<<<
   17610             :  *                 Py_INCREF((<PyObject **> data)[0])
   17611             :  *             else:
   17612             :  */
   17613           0 :       if (__pyx_v_inc) {
   17614             : 
   17615             :         /* "View.MemoryView":1379
   17616             :  *         if ndim == 1:
   17617             :  *             if inc:
   17618             :  *                 Py_INCREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
   17619             :  *             else:
   17620             :  *                 Py_DECREF((<PyObject **> data)[0])
   17621             :  */
   17622           0 :         Py_INCREF((((PyObject **)__pyx_v_data)[0]));
   17623             : 
   17624             :         /* "View.MemoryView":1378
   17625             :  *     for i in range(shape[0]):
   17626             :  *         if ndim == 1:
   17627             :  *             if inc:             # <<<<<<<<<<<<<<
   17628             :  *                 Py_INCREF((<PyObject **> data)[0])
   17629             :  *             else:
   17630             :  */
   17631           0 :         goto __pyx_L6;
   17632             :       }
   17633             : 
   17634             :       /* "View.MemoryView":1381
   17635             :  *                 Py_INCREF((<PyObject **> data)[0])
   17636             :  *             else:
   17637             :  *                 Py_DECREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
   17638             :  *         else:
   17639             :  *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)
   17640             :  */
   17641             :       /*else*/ {
   17642           0 :         Py_DECREF((((PyObject **)__pyx_v_data)[0]));
   17643             :       }
   17644           0 :       __pyx_L6:;
   17645             : 
   17646             :       /* "View.MemoryView":1377
   17647             :  * 
   17648             :  *     for i in range(shape[0]):
   17649             :  *         if ndim == 1:             # <<<<<<<<<<<<<<
   17650             :  *             if inc:
   17651             :  *                 Py_INCREF((<PyObject **> data)[0])
   17652             :  */
   17653           0 :       goto __pyx_L5;
   17654             :     }
   17655             : 
   17656             :     /* "View.MemoryView":1383
   17657             :  *                 Py_DECREF((<PyObject **> data)[0])
   17658             :  *         else:
   17659             :  *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)             # <<<<<<<<<<<<<<
   17660             :  * 
   17661             :  *         data += stride
   17662             :  */
   17663             :     /*else*/ {
   17664           0 :       __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
   17665             :     }
   17666           0 :     __pyx_L5:;
   17667             : 
   17668             :     /* "View.MemoryView":1385
   17669             :  *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)
   17670             :  * 
   17671             :  *         data += stride             # <<<<<<<<<<<<<<
   17672             :  * 
   17673             :  * 
   17674             :  */
   17675           0 :     __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
   17676             :   }
   17677             : 
   17678             :   /* "View.MemoryView":1371
   17679             :  * 
   17680             :  * @cname('__pyx_memoryview_refcount_objects_in_slice')
   17681             :  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   17682             :  *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
   17683             :  *     cdef Py_ssize_t i
   17684             :  */
   17685             : 
   17686             :   /* function exit code */
   17687           0 : }
   17688             : 
   17689             : /* "View.MemoryView":1391
   17690             :  * 
   17691             :  * @cname('__pyx_memoryview_slice_assign_scalar')
   17692             :  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
   17693             :  *                               size_t itemsize, void *item,
   17694             :  *                               bint dtype_is_object) noexcept nogil:
   17695             :  */
   17696             : 
   17697           0 : static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {
   17698             : 
   17699             :   /* "View.MemoryView":1394
   17700             :  *                               size_t itemsize, void *item,
   17701             :  *                               bint dtype_is_object) noexcept nogil:
   17702             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
   17703             :  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)
   17704             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=True)
   17705             :  */
   17706           0 :   __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
   17707             : 
   17708             :   /* "View.MemoryView":1395
   17709             :  *                               bint dtype_is_object) noexcept nogil:
   17710             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=False)
   17711             :  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)             # <<<<<<<<<<<<<<
   17712             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=True)
   17713             :  * 
   17714             :  */
   17715           0 :   __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);
   17716             : 
   17717             :   /* "View.MemoryView":1396
   17718             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=False)
   17719             :  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)
   17720             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
   17721             :  * 
   17722             :  * 
   17723             :  */
   17724           0 :   __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
   17725             : 
   17726             :   /* "View.MemoryView":1391
   17727             :  * 
   17728             :  * @cname('__pyx_memoryview_slice_assign_scalar')
   17729             :  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
   17730             :  *                               size_t itemsize, void *item,
   17731             :  *                               bint dtype_is_object) noexcept nogil:
   17732             :  */
   17733             : 
   17734             :   /* function exit code */
   17735           0 : }
   17736             : 
   17737             : /* "View.MemoryView":1400
   17738             :  * 
   17739             :  * @cname('__pyx_memoryview__slice_assign_scalar')
   17740             :  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   17741             :  *                               Py_ssize_t *strides, int ndim,
   17742             :  *                               size_t itemsize, void *item) noexcept nogil:
   17743             :  */
   17744             : 
   17745           0 : static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {
   17746           0 :   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
   17747           0 :   Py_ssize_t __pyx_v_stride;
   17748           0 :   Py_ssize_t __pyx_v_extent;
   17749           0 :   int __pyx_t_1;
   17750           0 :   Py_ssize_t __pyx_t_2;
   17751           0 :   Py_ssize_t __pyx_t_3;
   17752           0 :   Py_ssize_t __pyx_t_4;
   17753             : 
   17754             :   /* "View.MemoryView":1404
   17755             :  *                               size_t itemsize, void *item) noexcept nogil:
   17756             :  *     cdef Py_ssize_t i
   17757             :  *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<
   17758             :  *     cdef Py_ssize_t extent = shape[0]
   17759             :  * 
   17760             :  */
   17761           0 :   __pyx_v_stride = (__pyx_v_strides[0]);
   17762             : 
   17763             :   /* "View.MemoryView":1405
   17764             :  *     cdef Py_ssize_t i
   17765             :  *     cdef Py_ssize_t stride = strides[0]
   17766             :  *     cdef Py_ssize_t extent = shape[0]             # <<<<<<<<<<<<<<
   17767             :  * 
   17768             :  *     if ndim == 1:
   17769             :  */
   17770           0 :   __pyx_v_extent = (__pyx_v_shape[0]);
   17771             : 
   17772             :   /* "View.MemoryView":1407
   17773             :  *     cdef Py_ssize_t extent = shape[0]
   17774             :  * 
   17775             :  *     if ndim == 1:             # <<<<<<<<<<<<<<
   17776             :  *         for i in range(extent):
   17777             :  *             memcpy(data, item, itemsize)
   17778             :  */
   17779           0 :   __pyx_t_1 = (__pyx_v_ndim == 1);
   17780           0 :   if (__pyx_t_1) {
   17781             : 
   17782             :     /* "View.MemoryView":1408
   17783             :  * 
   17784             :  *     if ndim == 1:
   17785             :  *         for i in range(extent):             # <<<<<<<<<<<<<<
   17786             :  *             memcpy(data, item, itemsize)
   17787             :  *             data += stride
   17788             :  */
   17789             :     __pyx_t_2 = __pyx_v_extent;
   17790             :     __pyx_t_3 = __pyx_t_2;
   17791           0 :     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   17792           0 :       __pyx_v_i = __pyx_t_4;
   17793             : 
   17794             :       /* "View.MemoryView":1409
   17795             :  *     if ndim == 1:
   17796             :  *         for i in range(extent):
   17797             :  *             memcpy(data, item, itemsize)             # <<<<<<<<<<<<<<
   17798             :  *             data += stride
   17799             :  *     else:
   17800             :  */
   17801           0 :       (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));
   17802             : 
   17803             :       /* "View.MemoryView":1410
   17804             :  *         for i in range(extent):
   17805             :  *             memcpy(data, item, itemsize)
   17806             :  *             data += stride             # <<<<<<<<<<<<<<
   17807             :  *     else:
   17808             :  *         for i in range(extent):
   17809             :  */
   17810           0 :       __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
   17811             :     }
   17812             : 
   17813             :     /* "View.MemoryView":1407
   17814             :  *     cdef Py_ssize_t extent = shape[0]
   17815             :  * 
   17816             :  *     if ndim == 1:             # <<<<<<<<<<<<<<
   17817             :  *         for i in range(extent):
   17818             :  *             memcpy(data, item, itemsize)
   17819             :  */
   17820           0 :     goto __pyx_L3;
   17821             :   }
   17822             : 
   17823             :   /* "View.MemoryView":1412
   17824             :  *             data += stride
   17825             :  *     else:
   17826             :  *         for i in range(extent):             # <<<<<<<<<<<<<<
   17827             :  *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)
   17828             :  *             data += stride
   17829             :  */
   17830             :   /*else*/ {
   17831             :     __pyx_t_2 = __pyx_v_extent;
   17832             :     __pyx_t_3 = __pyx_t_2;
   17833           0 :     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   17834           0 :       __pyx_v_i = __pyx_t_4;
   17835             : 
   17836             :       /* "View.MemoryView":1413
   17837             :  *     else:
   17838             :  *         for i in range(extent):
   17839             :  *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)             # <<<<<<<<<<<<<<
   17840             :  *             data += stride
   17841             :  * 
   17842             :  */
   17843           0 :       __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);
   17844             : 
   17845             :       /* "View.MemoryView":1414
   17846             :  *         for i in range(extent):
   17847             :  *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)
   17848             :  *             data += stride             # <<<<<<<<<<<<<<
   17849             :  * 
   17850             :  * 
   17851             :  */
   17852           0 :       __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
   17853             :     }
   17854             :   }
   17855           0 :   __pyx_L3:;
   17856             : 
   17857             :   /* "View.MemoryView":1400
   17858             :  * 
   17859             :  * @cname('__pyx_memoryview__slice_assign_scalar')
   17860             :  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   17861             :  *                               Py_ssize_t *strides, int ndim,
   17862             :  *                               size_t itemsize, void *item) noexcept nogil:
   17863             :  */
   17864             : 
   17865             :   /* function exit code */
   17866           0 : }
   17867             : 
   17868             : /* "(tree fragment)":1
   17869             :  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
   17870             :  *     cdef object __pyx_PickleError
   17871             :  *     cdef object __pyx_result
   17872             :  */
   17873             : 
   17874             : /* Python wrapper */
   17875             : static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, 
   17876             : #if CYTHON_METH_FASTCALL
   17877             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   17878             : #else
   17879             : PyObject *__pyx_args, PyObject *__pyx_kwds
   17880             : #endif
   17881             : ); /*proto*/
   17882             : static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   17883           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, 
   17884             : #if CYTHON_METH_FASTCALL
   17885             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   17886             : #else
   17887             : PyObject *__pyx_args, PyObject *__pyx_kwds
   17888             : #endif
   17889             : ) {
   17890           0 :   PyObject *__pyx_v___pyx_type = 0;
   17891           0 :   long __pyx_v___pyx_checksum;
   17892           0 :   PyObject *__pyx_v___pyx_state = 0;
   17893             :   #if !CYTHON_METH_FASTCALL
   17894             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   17895             :   #endif
   17896           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   17897           0 :   PyObject* values[3] = {0,0,0};
   17898           0 :   int __pyx_lineno = 0;
   17899           0 :   const char *__pyx_filename = NULL;
   17900           0 :   int __pyx_clineno = 0;
   17901           0 :   PyObject *__pyx_r = 0;
   17902             :   __Pyx_RefNannyDeclarations
   17903           0 :   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
   17904             :   #if !CYTHON_METH_FASTCALL
   17905             :   #if CYTHON_ASSUME_SAFE_MACROS
   17906             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   17907             :   #else
   17908             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   17909             :   #endif
   17910             :   #endif
   17911           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   17912             :   {
   17913           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
   17914           0 :     if (__pyx_kwds) {
   17915           0 :       Py_ssize_t kw_args;
   17916           0 :       switch (__pyx_nargs) {
   17917           0 :         case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   17918           0 :         CYTHON_FALLTHROUGH;
   17919           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   17920           0 :         CYTHON_FALLTHROUGH;
   17921           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   17922           0 :         CYTHON_FALLTHROUGH;
   17923           0 :         case  0: break;
   17924           0 :         default: goto __pyx_L5_argtuple_error;
   17925             :       }
   17926           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   17927           0 :       switch (__pyx_nargs) {
   17928           0 :         case  0:
   17929           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
   17930           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   17931           0 :           kw_args--;
   17932             :         }
   17933           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
   17934           0 :         else goto __pyx_L5_argtuple_error;
   17935           0 :         CYTHON_FALLTHROUGH;
   17936             :         case  1:
   17937           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
   17938           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   17939           0 :           kw_args--;
   17940             :         }
   17941           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
   17942             :         else {
   17943           0 :           __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
   17944             :         }
   17945           0 :         CYTHON_FALLTHROUGH;
   17946             :         case  2:
   17947           0 :         if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
   17948           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
   17949           0 :           kw_args--;
   17950             :         }
   17951           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
   17952             :         else {
   17953           0 :           __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
   17954             :         }
   17955             :       }
   17956           0 :       if (unlikely(kw_args > 0)) {
   17957           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   17958           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
   17959             :       }
   17960           0 :     } else if (unlikely(__pyx_nargs != 3)) {
   17961           0 :       goto __pyx_L5_argtuple_error;
   17962             :     } else {
   17963           0 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   17964           0 :       values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   17965           0 :       values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   17966             :     }
   17967           0 :     __pyx_v___pyx_type = values[0];
   17968           0 :     __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
   17969           0 :     __pyx_v___pyx_state = values[2];
   17970             :   }
   17971           0 :   goto __pyx_L6_skip;
   17972           0 :   __pyx_L5_argtuple_error:;
   17973           0 :   __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
   17974           0 :   __pyx_L6_skip:;
   17975           0 :   goto __pyx_L4_argument_unpacking_done;
   17976           0 :   __pyx_L3_error:;
   17977             :   {
   17978           0 :     Py_ssize_t __pyx_temp;
   17979           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   17980             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   17981             :     }
   17982             :   }
   17983           0 :   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
   17984           0 :   __Pyx_RefNannyFinishContext();
   17985           0 :   return NULL;
   17986           0 :   __pyx_L4_argument_unpacking_done:;
   17987           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
   17988             : 
   17989             :   /* function exit code */
   17990             :   {
   17991           0 :     Py_ssize_t __pyx_temp;
   17992           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   17993             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   17994             :     }
   17995             :   }
   17996             :   __Pyx_RefNannyFinishContext();
   17997             :   return __pyx_r;
   17998             : }
   17999             : 
   18000           0 : static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
   18001           0 :   PyObject *__pyx_v___pyx_PickleError = 0;
   18002           0 :   PyObject *__pyx_v___pyx_result = 0;
   18003           0 :   PyObject *__pyx_r = NULL;
   18004             :   __Pyx_RefNannyDeclarations
   18005           0 :   PyObject *__pyx_t_1 = NULL;
   18006           0 :   int __pyx_t_2;
   18007           0 :   PyObject *__pyx_t_3 = NULL;
   18008           0 :   PyObject *__pyx_t_4 = NULL;
   18009           0 :   unsigned int __pyx_t_5;
   18010           0 :   int __pyx_lineno = 0;
   18011           0 :   const char *__pyx_filename = NULL;
   18012           0 :   int __pyx_clineno = 0;
   18013           0 :   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 1);
   18014             : 
   18015             :   /* "(tree fragment)":4
   18016             :  *     cdef object __pyx_PickleError
   18017             :  *     cdef object __pyx_result
   18018             :  *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):             # <<<<<<<<<<<<<<
   18019             :  *         from pickle import PickleError as __pyx_PickleError
   18020             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18021             :  */
   18022           0 :   __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
   18023           0 :   __Pyx_GOTREF(__pyx_t_1);
   18024           0 :   __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__8, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
   18025           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18026           0 :   if (__pyx_t_2) {
   18027             : 
   18028             :     /* "(tree fragment)":5
   18029             :  *     cdef object __pyx_result
   18030             :  *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):
   18031             :  *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
   18032             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18033             :  *     __pyx_result = Enum.__new__(__pyx_type)
   18034             :  */
   18035           0 :     __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
   18036           0 :     __Pyx_GOTREF(__pyx_t_1);
   18037           0 :     __Pyx_INCREF(__pyx_n_s_PickleError);
   18038           0 :     __Pyx_GIVEREF(__pyx_n_s_PickleError);
   18039           0 :     if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
   18040           0 :     __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
   18041           0 :     __Pyx_GOTREF(__pyx_t_3);
   18042           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18043           0 :     __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
   18044           0 :     __Pyx_GOTREF(__pyx_t_1);
   18045           0 :     __Pyx_INCREF(__pyx_t_1);
   18046           0 :     __pyx_v___pyx_PickleError = __pyx_t_1;
   18047           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18048           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   18049             : 
   18050             :     /* "(tree fragment)":6
   18051             :  *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):
   18052             :  *         from pickle import PickleError as __pyx_PickleError
   18053             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum             # <<<<<<<<<<<<<<
   18054             :  *     __pyx_result = Enum.__new__(__pyx_type)
   18055             :  *     if __pyx_state is not None:
   18056             :  */
   18057           0 :     __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
   18058           0 :     __Pyx_GOTREF(__pyx_t_3);
   18059           0 :     __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
   18060           0 :     __Pyx_GOTREF(__pyx_t_1);
   18061           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   18062           0 :     __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
   18063           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18064           0 :     __PYX_ERR(1, 6, __pyx_L1_error)
   18065             : 
   18066             :     /* "(tree fragment)":4
   18067             :  *     cdef object __pyx_PickleError
   18068             :  *     cdef object __pyx_result
   18069             :  *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):             # <<<<<<<<<<<<<<
   18070             :  *         from pickle import PickleError as __pyx_PickleError
   18071             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18072             :  */
   18073             :   }
   18074             : 
   18075             :   /* "(tree fragment)":7
   18076             :  *         from pickle import PickleError as __pyx_PickleError
   18077             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18078             :  *     __pyx_result = Enum.__new__(__pyx_type)             # <<<<<<<<<<<<<<
   18079             :  *     if __pyx_state is not None:
   18080             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18081             :  */
   18082           0 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
   18083           0 :   __Pyx_GOTREF(__pyx_t_3);
   18084           0 :   __pyx_t_4 = NULL;
   18085           0 :   __pyx_t_5 = 0;
   18086             :   #if CYTHON_UNPACK_METHODS
   18087           0 :   if (likely(PyMethod_Check(__pyx_t_3))) {
   18088           0 :     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
   18089           0 :     if (likely(__pyx_t_4)) {
   18090           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   18091           0 :       __Pyx_INCREF(__pyx_t_4);
   18092           0 :       __Pyx_INCREF(function);
   18093           0 :       __Pyx_DECREF_SET(__pyx_t_3, function);
   18094             :       __pyx_t_5 = 1;
   18095             :     }
   18096             :   }
   18097             :   #endif
   18098             :   {
   18099           0 :     PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
   18100           0 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
   18101           0 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   18102           0 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
   18103           0 :     __Pyx_GOTREF(__pyx_t_1);
   18104           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   18105             :   }
   18106           0 :   __pyx_v___pyx_result = __pyx_t_1;
   18107           0 :   __pyx_t_1 = 0;
   18108             : 
   18109             :   /* "(tree fragment)":8
   18110             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18111             :  *     __pyx_result = Enum.__new__(__pyx_type)
   18112             :  *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
   18113             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18114             :  *     return __pyx_result
   18115             :  */
   18116           0 :   __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
   18117           0 :   if (__pyx_t_2) {
   18118             : 
   18119             :     /* "(tree fragment)":9
   18120             :  *     __pyx_result = Enum.__new__(__pyx_type)
   18121             :  *     if __pyx_state is not None:
   18122             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
   18123             :  *     return __pyx_result
   18124             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
   18125             :  */
   18126           0 :     if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error)
   18127           0 :     __pyx_t_1 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
   18128           0 :     __Pyx_GOTREF(__pyx_t_1);
   18129           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18130             : 
   18131             :     /* "(tree fragment)":8
   18132             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18133             :  *     __pyx_result = Enum.__new__(__pyx_type)
   18134             :  *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
   18135             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18136             :  *     return __pyx_result
   18137             :  */
   18138             :   }
   18139             : 
   18140             :   /* "(tree fragment)":10
   18141             :  *     if __pyx_state is not None:
   18142             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18143             :  *     return __pyx_result             # <<<<<<<<<<<<<<
   18144             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
   18145             :  *     __pyx_result.name = __pyx_state[0]
   18146             :  */
   18147           0 :   __Pyx_XDECREF(__pyx_r);
   18148           0 :   __Pyx_INCREF(__pyx_v___pyx_result);
   18149           0 :   __pyx_r = __pyx_v___pyx_result;
   18150           0 :   goto __pyx_L0;
   18151             : 
   18152             :   /* "(tree fragment)":1
   18153             :  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
   18154             :  *     cdef object __pyx_PickleError
   18155             :  *     cdef object __pyx_result
   18156             :  */
   18157             : 
   18158             :   /* function exit code */
   18159           0 :   __pyx_L1_error:;
   18160           0 :   __Pyx_XDECREF(__pyx_t_1);
   18161           0 :   __Pyx_XDECREF(__pyx_t_3);
   18162           0 :   __Pyx_XDECREF(__pyx_t_4);
   18163           0 :   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
   18164           0 :   __pyx_r = NULL;
   18165           0 :   __pyx_L0:;
   18166           0 :   __Pyx_XDECREF(__pyx_v___pyx_PickleError);
   18167           0 :   __Pyx_XDECREF(__pyx_v___pyx_result);
   18168           0 :   __Pyx_XGIVEREF(__pyx_r);
   18169           0 :   __Pyx_RefNannyFinishContext();
   18170           0 :   return __pyx_r;
   18171             : }
   18172             : 
   18173             : /* "(tree fragment)":11
   18174             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18175             :  *     return __pyx_result
   18176             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
   18177             :  *     __pyx_result.name = __pyx_state[0]
   18178             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
   18179             :  */
   18180             : 
   18181           0 : static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
   18182           0 :   PyObject *__pyx_r = NULL;
   18183             :   __Pyx_RefNannyDeclarations
   18184           0 :   PyObject *__pyx_t_1 = NULL;
   18185           0 :   int __pyx_t_2;
   18186           0 :   Py_ssize_t __pyx_t_3;
   18187           0 :   int __pyx_t_4;
   18188           0 :   PyObject *__pyx_t_5 = NULL;
   18189           0 :   PyObject *__pyx_t_6 = NULL;
   18190           0 :   PyObject *__pyx_t_7 = NULL;
   18191           0 :   unsigned int __pyx_t_8;
   18192           0 :   int __pyx_lineno = 0;
   18193           0 :   const char *__pyx_filename = NULL;
   18194           0 :   int __pyx_clineno = 0;
   18195           0 :   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 1);
   18196             : 
   18197             :   /* "(tree fragment)":12
   18198             :  *     return __pyx_result
   18199             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
   18200             :  *     __pyx_result.name = __pyx_state[0]             # <<<<<<<<<<<<<<
   18201             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
   18202             :  *         __pyx_result.__dict__.update(__pyx_state[1])
   18203             :  */
   18204           0 :   if (unlikely(__pyx_v___pyx_state == Py_None)) {
   18205           0 :     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
   18206           0 :     __PYX_ERR(1, 12, __pyx_L1_error)
   18207             :   }
   18208           0 :   __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
   18209           0 :   __Pyx_GOTREF(__pyx_t_1);
   18210           0 :   __Pyx_GIVEREF(__pyx_t_1);
   18211           0 :   __Pyx_GOTREF(__pyx_v___pyx_result->name);
   18212           0 :   __Pyx_DECREF(__pyx_v___pyx_result->name);
   18213           0 :   __pyx_v___pyx_result->name = __pyx_t_1;
   18214           0 :   __pyx_t_1 = 0;
   18215             : 
   18216             :   /* "(tree fragment)":13
   18217             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
   18218             :  *     __pyx_result.name = __pyx_state[0]
   18219             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
   18220             :  *         __pyx_result.__dict__.update(__pyx_state[1])
   18221             :  */
   18222           0 :   if (unlikely(__pyx_v___pyx_state == Py_None)) {
   18223             :     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
   18224             :     __PYX_ERR(1, 13, __pyx_L1_error)
   18225             :   }
   18226           0 :   __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
   18227           0 :   __pyx_t_4 = (__pyx_t_3 > 1);
   18228           0 :   if (__pyx_t_4) {
   18229           0 :   } else {
   18230           0 :     __pyx_t_2 = __pyx_t_4;
   18231           0 :     goto __pyx_L4_bool_binop_done;
   18232             :   }
   18233           0 :   __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
   18234             :   __pyx_t_2 = __pyx_t_4;
   18235           0 :   __pyx_L4_bool_binop_done:;
   18236           0 :   if (__pyx_t_2) {
   18237             : 
   18238             :     /* "(tree fragment)":14
   18239             :  *     __pyx_result.name = __pyx_state[0]
   18240             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
   18241             :  *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
   18242             :  */
   18243           0 :     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
   18244           0 :     __Pyx_GOTREF(__pyx_t_5);
   18245           0 :     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
   18246           0 :     __Pyx_GOTREF(__pyx_t_6);
   18247           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   18248           0 :     if (unlikely(__pyx_v___pyx_state == Py_None)) {
   18249             :       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
   18250             :       __PYX_ERR(1, 14, __pyx_L1_error)
   18251             :     }
   18252           0 :     __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
   18253           0 :     __Pyx_GOTREF(__pyx_t_5);
   18254           0 :     __pyx_t_7 = NULL;
   18255           0 :     __pyx_t_8 = 0;
   18256             :     #if CYTHON_UNPACK_METHODS
   18257           0 :     if (likely(PyMethod_Check(__pyx_t_6))) {
   18258           0 :       __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
   18259           0 :       if (likely(__pyx_t_7)) {
   18260           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
   18261           0 :         __Pyx_INCREF(__pyx_t_7);
   18262           0 :         __Pyx_INCREF(function);
   18263           0 :         __Pyx_DECREF_SET(__pyx_t_6, function);
   18264             :         __pyx_t_8 = 1;
   18265             :       }
   18266             :     }
   18267             :     #endif
   18268             :     {
   18269           0 :       PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
   18270           0 :       __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
   18271           0 :       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   18272           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   18273           0 :       if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
   18274           0 :       __Pyx_GOTREF(__pyx_t_1);
   18275           0 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   18276             :     }
   18277           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18278             : 
   18279             :     /* "(tree fragment)":13
   18280             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
   18281             :  *     __pyx_result.name = __pyx_state[0]
   18282             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
   18283             :  *         __pyx_result.__dict__.update(__pyx_state[1])
   18284             :  */
   18285             :   }
   18286             : 
   18287             :   /* "(tree fragment)":11
   18288             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18289             :  *     return __pyx_result
   18290             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
   18291             :  *     __pyx_result.name = __pyx_state[0]
   18292             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
   18293             :  */
   18294             : 
   18295             :   /* function exit code */
   18296           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   18297           0 :   goto __pyx_L0;
   18298           0 :   __pyx_L1_error:;
   18299           0 :   __Pyx_XDECREF(__pyx_t_1);
   18300           0 :   __Pyx_XDECREF(__pyx_t_5);
   18301           0 :   __Pyx_XDECREF(__pyx_t_6);
   18302           0 :   __Pyx_XDECREF(__pyx_t_7);
   18303           0 :   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
   18304           0 :   __pyx_r = 0;
   18305           0 :   __pyx_L0:;
   18306           0 :   __Pyx_XGIVEREF(__pyx_r);
   18307           0 :   __Pyx_RefNannyFinishContext();
   18308           0 :   return __pyx_r;
   18309             : }
   18310             : 
   18311             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286
   18312             :  * 
   18313             :  *         @property
   18314             :  *         cdef inline npy_intp itemsize(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18315             :  *             return PyDataType_ELSIZE(self)
   18316             :  * 
   18317             :  */
   18318             : 
   18319             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self) {
   18320             :   npy_intp __pyx_r;
   18321             : 
   18322             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":287
   18323             :  *         @property
   18324             :  *         cdef inline npy_intp itemsize(self) noexcept nogil:
   18325             :  *             return PyDataType_ELSIZE(self)             # <<<<<<<<<<<<<<
   18326             :  * 
   18327             :  *         @property
   18328             :  */
   18329             :   __pyx_r = PyDataType_ELSIZE(__pyx_v_self);
   18330             :   goto __pyx_L0;
   18331             : 
   18332             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286
   18333             :  * 
   18334             :  *         @property
   18335             :  *         cdef inline npy_intp itemsize(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18336             :  *             return PyDataType_ELSIZE(self)
   18337             :  * 
   18338             :  */
   18339             : 
   18340             :   /* function exit code */
   18341             :   __pyx_L0:;
   18342             :   return __pyx_r;
   18343             : }
   18344             : 
   18345             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290
   18346             :  * 
   18347             :  *         @property
   18348             :  *         cdef inline npy_intp alignment(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18349             :  *             return PyDataType_ALIGNMENT(self)
   18350             :  * 
   18351             :  */
   18352             : 
   18353             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self) {
   18354             :   npy_intp __pyx_r;
   18355             : 
   18356             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":291
   18357             :  *         @property
   18358             :  *         cdef inline npy_intp alignment(self) noexcept nogil:
   18359             :  *             return PyDataType_ALIGNMENT(self)             # <<<<<<<<<<<<<<
   18360             :  * 
   18361             :  *         # Use fields/names with care as they may be NULL.  You must check
   18362             :  */
   18363             :   __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self);
   18364             :   goto __pyx_L0;
   18365             : 
   18366             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290
   18367             :  * 
   18368             :  *         @property
   18369             :  *         cdef inline npy_intp alignment(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18370             :  *             return PyDataType_ALIGNMENT(self)
   18371             :  * 
   18372             :  */
   18373             : 
   18374             :   /* function exit code */
   18375             :   __pyx_L0:;
   18376             :   return __pyx_r;
   18377             : }
   18378             : 
   18379             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296
   18380             :  *         # for this using PyDataType_HASFIELDS.
   18381             :  *         @property
   18382             :  *         cdef inline object fields(self):             # <<<<<<<<<<<<<<
   18383             :  *             return <object>PyDataType_FIELDS(self)
   18384             :  * 
   18385             :  */
   18386             : 
   18387             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr *__pyx_v_self) {
   18388             :   PyObject *__pyx_r = NULL;
   18389             :   __Pyx_RefNannyDeclarations
   18390             :   PyObject *__pyx_t_1;
   18391             :   __Pyx_RefNannySetupContext("fields", 1);
   18392             : 
   18393             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":297
   18394             :  *         @property
   18395             :  *         cdef inline object fields(self):
   18396             :  *             return <object>PyDataType_FIELDS(self)             # <<<<<<<<<<<<<<
   18397             :  * 
   18398             :  *         @property
   18399             :  */
   18400             :   __Pyx_XDECREF(__pyx_r);
   18401             :   __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
   18402             :   __Pyx_INCREF(((PyObject *)__pyx_t_1));
   18403             :   __pyx_r = ((PyObject *)__pyx_t_1);
   18404             :   goto __pyx_L0;
   18405             : 
   18406             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296
   18407             :  *         # for this using PyDataType_HASFIELDS.
   18408             :  *         @property
   18409             :  *         cdef inline object fields(self):             # <<<<<<<<<<<<<<
   18410             :  *             return <object>PyDataType_FIELDS(self)
   18411             :  * 
   18412             :  */
   18413             : 
   18414             :   /* function exit code */
   18415             :   __pyx_L0:;
   18416             :   __Pyx_XGIVEREF(__pyx_r);
   18417             :   __Pyx_RefNannyFinishContext();
   18418             :   return __pyx_r;
   18419             : }
   18420             : 
   18421             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300
   18422             :  * 
   18423             :  *         @property
   18424             :  *         cdef inline tuple names(self):             # <<<<<<<<<<<<<<
   18425             :  *             return <tuple>PyDataType_NAMES(self)
   18426             :  * 
   18427             :  */
   18428             : 
   18429             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr *__pyx_v_self) {
   18430             :   PyObject *__pyx_r = NULL;
   18431             :   __Pyx_RefNannyDeclarations
   18432             :   PyObject *__pyx_t_1;
   18433             :   __Pyx_RefNannySetupContext("names", 1);
   18434             : 
   18435             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":301
   18436             :  *         @property
   18437             :  *         cdef inline tuple names(self):
   18438             :  *             return <tuple>PyDataType_NAMES(self)             # <<<<<<<<<<<<<<
   18439             :  * 
   18440             :  *         # Use PyDataType_HASSUBARRAY to test whether this field is
   18441             :  */
   18442             :   __Pyx_XDECREF(__pyx_r);
   18443             :   __pyx_t_1 = PyDataType_NAMES(__pyx_v_self);
   18444             :   __Pyx_INCREF(((PyObject*)__pyx_t_1));
   18445             :   __pyx_r = ((PyObject*)__pyx_t_1);
   18446             :   goto __pyx_L0;
   18447             : 
   18448             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300
   18449             :  * 
   18450             :  *         @property
   18451             :  *         cdef inline tuple names(self):             # <<<<<<<<<<<<<<
   18452             :  *             return <tuple>PyDataType_NAMES(self)
   18453             :  * 
   18454             :  */
   18455             : 
   18456             :   /* function exit code */
   18457             :   __pyx_L0:;
   18458             :   __Pyx_XGIVEREF(__pyx_r);
   18459             :   __Pyx_RefNannyFinishContext();
   18460             :   return __pyx_r;
   18461             : }
   18462             : 
   18463             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":307
   18464             :  *         # this field via the inline helper method PyDataType_SHAPE.
   18465             :  *         @property
   18466             :  *         cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18467             :  *             return PyDataType_SUBARRAY(self)
   18468             :  * 
   18469             :  */
   18470             : 
   18471             : static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self) {
   18472             :   PyArray_ArrayDescr *__pyx_r;
   18473             : 
   18474             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":308
   18475             :  *         @property
   18476             :  *         cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
   18477             :  *             return PyDataType_SUBARRAY(self)             # <<<<<<<<<<<<<<
   18478             :  * 
   18479             :  *         @property
   18480             :  */
   18481             :   __pyx_r = PyDataType_SUBARRAY(__pyx_v_self);
   18482             :   goto __pyx_L0;
   18483             : 
   18484             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":307
   18485             :  *         # this field via the inline helper method PyDataType_SHAPE.
   18486             :  *         @property
   18487             :  *         cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18488             :  *             return PyDataType_SUBARRAY(self)
   18489             :  * 
   18490             :  */
   18491             : 
   18492             :   /* function exit code */
   18493             :   __pyx_L0:;
   18494             :   return __pyx_r;
   18495             : }
   18496             : 
   18497             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311
   18498             :  * 
   18499             :  *         @property
   18500             :  *         cdef inline npy_uint64 flags(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18501             :  *             """The data types flags."""
   18502             :  *             return PyDataType_FLAGS(self)
   18503             :  */
   18504             : 
   18505             : static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self) {
   18506             :   npy_uint64 __pyx_r;
   18507             : 
   18508             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":313
   18509             :  *         cdef inline npy_uint64 flags(self) noexcept nogil:
   18510             :  *             """The data types flags."""
   18511             :  *             return PyDataType_FLAGS(self)             # <<<<<<<<<<<<<<
   18512             :  * 
   18513             :  * 
   18514             :  */
   18515             :   __pyx_r = PyDataType_FLAGS(__pyx_v_self);
   18516             :   goto __pyx_L0;
   18517             : 
   18518             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311
   18519             :  * 
   18520             :  *         @property
   18521             :  *         cdef inline npy_uint64 flags(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18522             :  *             """The data types flags."""
   18523             :  *             return PyDataType_FLAGS(self)
   18524             :  */
   18525             : 
   18526             :   /* function exit code */
   18527             :   __pyx_L0:;
   18528             :   return __pyx_r;
   18529             : }
   18530             : 
   18531             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323
   18532             :  * 
   18533             :  *         @property
   18534             :  *         cdef inline int numiter(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18535             :  *             """The number of arrays that need to be broadcast to the same shape."""
   18536             :  *             return PyArray_MultiIter_NUMITER(self)
   18537             :  */
   18538             : 
   18539             : static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self) {
   18540             :   int __pyx_r;
   18541             : 
   18542             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":325
   18543             :  *         cdef inline int numiter(self) noexcept nogil:
   18544             :  *             """The number of arrays that need to be broadcast to the same shape."""
   18545             :  *             return PyArray_MultiIter_NUMITER(self)             # <<<<<<<<<<<<<<
   18546             :  * 
   18547             :  *         @property
   18548             :  */
   18549             :   __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self);
   18550             :   goto __pyx_L0;
   18551             : 
   18552             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323
   18553             :  * 
   18554             :  *         @property
   18555             :  *         cdef inline int numiter(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18556             :  *             """The number of arrays that need to be broadcast to the same shape."""
   18557             :  *             return PyArray_MultiIter_NUMITER(self)
   18558             :  */
   18559             : 
   18560             :   /* function exit code */
   18561             :   __pyx_L0:;
   18562             :   return __pyx_r;
   18563             : }
   18564             : 
   18565             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328
   18566             :  * 
   18567             :  *         @property
   18568             :  *         cdef inline npy_intp size(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18569             :  *             """The total broadcasted size."""
   18570             :  *             return PyArray_MultiIter_SIZE(self)
   18571             :  */
   18572             : 
   18573             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self) {
   18574             :   npy_intp __pyx_r;
   18575             : 
   18576             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":330
   18577             :  *         cdef inline npy_intp size(self) noexcept nogil:
   18578             :  *             """The total broadcasted size."""
   18579             :  *             return PyArray_MultiIter_SIZE(self)             # <<<<<<<<<<<<<<
   18580             :  * 
   18581             :  *         @property
   18582             :  */
   18583             :   __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self);
   18584             :   goto __pyx_L0;
   18585             : 
   18586             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328
   18587             :  * 
   18588             :  *         @property
   18589             :  *         cdef inline npy_intp size(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18590             :  *             """The total broadcasted size."""
   18591             :  *             return PyArray_MultiIter_SIZE(self)
   18592             :  */
   18593             : 
   18594             :   /* function exit code */
   18595             :   __pyx_L0:;
   18596             :   return __pyx_r;
   18597             : }
   18598             : 
   18599             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333
   18600             :  * 
   18601             :  *         @property
   18602             :  *         cdef inline npy_intp index(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18603             :  *             """The current (1-d) index into the broadcasted result."""
   18604             :  *             return PyArray_MultiIter_INDEX(self)
   18605             :  */
   18606             : 
   18607             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self) {
   18608             :   npy_intp __pyx_r;
   18609             : 
   18610             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":335
   18611             :  *         cdef inline npy_intp index(self) noexcept nogil:
   18612             :  *             """The current (1-d) index into the broadcasted result."""
   18613             :  *             return PyArray_MultiIter_INDEX(self)             # <<<<<<<<<<<<<<
   18614             :  * 
   18615             :  *         @property
   18616             :  */
   18617             :   __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self);
   18618             :   goto __pyx_L0;
   18619             : 
   18620             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333
   18621             :  * 
   18622             :  *         @property
   18623             :  *         cdef inline npy_intp index(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18624             :  *             """The current (1-d) index into the broadcasted result."""
   18625             :  *             return PyArray_MultiIter_INDEX(self)
   18626             :  */
   18627             : 
   18628             :   /* function exit code */
   18629             :   __pyx_L0:;
   18630             :   return __pyx_r;
   18631             : }
   18632             : 
   18633             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338
   18634             :  * 
   18635             :  *         @property
   18636             :  *         cdef inline int nd(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18637             :  *             """The number of dimensions in the broadcasted result."""
   18638             :  *             return PyArray_MultiIter_NDIM(self)
   18639             :  */
   18640             : 
   18641             : static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self) {
   18642             :   int __pyx_r;
   18643             : 
   18644             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":340
   18645             :  *         cdef inline int nd(self) noexcept nogil:
   18646             :  *             """The number of dimensions in the broadcasted result."""
   18647             :  *             return PyArray_MultiIter_NDIM(self)             # <<<<<<<<<<<<<<
   18648             :  * 
   18649             :  *         @property
   18650             :  */
   18651             :   __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self);
   18652             :   goto __pyx_L0;
   18653             : 
   18654             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338
   18655             :  * 
   18656             :  *         @property
   18657             :  *         cdef inline int nd(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18658             :  *             """The number of dimensions in the broadcasted result."""
   18659             :  *             return PyArray_MultiIter_NDIM(self)
   18660             :  */
   18661             : 
   18662             :   /* function exit code */
   18663             :   __pyx_L0:;
   18664             :   return __pyx_r;
   18665             : }
   18666             : 
   18667             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343
   18668             :  * 
   18669             :  *         @property
   18670             :  *         cdef inline npy_intp* dimensions(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18671             :  *             """The shape of the broadcasted result."""
   18672             :  *             return PyArray_MultiIter_DIMS(self)
   18673             :  */
   18674             : 
   18675             : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self) {
   18676             :   npy_intp *__pyx_r;
   18677             : 
   18678             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":345
   18679             :  *         cdef inline npy_intp* dimensions(self) noexcept nogil:
   18680             :  *             """The shape of the broadcasted result."""
   18681             :  *             return PyArray_MultiIter_DIMS(self)             # <<<<<<<<<<<<<<
   18682             :  * 
   18683             :  *         @property
   18684             :  */
   18685             :   __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self);
   18686             :   goto __pyx_L0;
   18687             : 
   18688             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343
   18689             :  * 
   18690             :  *         @property
   18691             :  *         cdef inline npy_intp* dimensions(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18692             :  *             """The shape of the broadcasted result."""
   18693             :  *             return PyArray_MultiIter_DIMS(self)
   18694             :  */
   18695             : 
   18696             :   /* function exit code */
   18697             :   __pyx_L0:;
   18698             :   return __pyx_r;
   18699             : }
   18700             : 
   18701             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348
   18702             :  * 
   18703             :  *         @property
   18704             :  *         cdef inline void** iters(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18705             :  *             """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
   18706             :  *             On return, the iterators are adjusted for broadcasting."""
   18707             :  */
   18708             : 
   18709             : static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self) {
   18710             :   void **__pyx_r;
   18711             : 
   18712             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":351
   18713             :  *             """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
   18714             :  *             On return, the iterators are adjusted for broadcasting."""
   18715             :  *             return PyArray_MultiIter_ITERS(self)             # <<<<<<<<<<<<<<
   18716             :  * 
   18717             :  * 
   18718             :  */
   18719             :   __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self);
   18720             :   goto __pyx_L0;
   18721             : 
   18722             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348
   18723             :  * 
   18724             :  *         @property
   18725             :  *         cdef inline void** iters(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18726             :  *             """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
   18727             :  *             On return, the iterators are adjusted for broadcasting."""
   18728             :  */
   18729             : 
   18730             :   /* function exit code */
   18731             :   __pyx_L0:;
   18732             :   return __pyx_r;
   18733             : }
   18734             : 
   18735             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366
   18736             :  * 
   18737             :  *         @property
   18738             :  *         cdef inline PyObject* base(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18739             :  *             """Returns a borrowed reference to the object owning the data/memory.
   18740             :  *             """
   18741             :  */
   18742             : 
   18743             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) {
   18744             :   PyObject *__pyx_r;
   18745             : 
   18746             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":369
   18747             :  *             """Returns a borrowed reference to the object owning the data/memory.
   18748             :  *             """
   18749             :  *             return PyArray_BASE(self)             # <<<<<<<<<<<<<<
   18750             :  * 
   18751             :  *         @property
   18752             :  */
   18753             :   __pyx_r = PyArray_BASE(__pyx_v_self);
   18754             :   goto __pyx_L0;
   18755             : 
   18756             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366
   18757             :  * 
   18758             :  *         @property
   18759             :  *         cdef inline PyObject* base(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18760             :  *             """Returns a borrowed reference to the object owning the data/memory.
   18761             :  *             """
   18762             :  */
   18763             : 
   18764             :   /* function exit code */
   18765             :   __pyx_L0:;
   18766             :   return __pyx_r;
   18767             : }
   18768             : 
   18769             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372
   18770             :  * 
   18771             :  *         @property
   18772             :  *         cdef inline dtype descr(self):             # <<<<<<<<<<<<<<
   18773             :  *             """Returns an owned reference to the dtype of the array.
   18774             :  *             """
   18775             :  */
   18776             : 
   18777             : static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self) {
   18778             :   PyArray_Descr *__pyx_r = NULL;
   18779             :   __Pyx_RefNannyDeclarations
   18780             :   PyArray_Descr *__pyx_t_1;
   18781             :   __Pyx_RefNannySetupContext("descr", 1);
   18782             : 
   18783             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":375
   18784             :  *             """Returns an owned reference to the dtype of the array.
   18785             :  *             """
   18786             :  *             return <dtype>PyArray_DESCR(self)             # <<<<<<<<<<<<<<
   18787             :  * 
   18788             :  *         @property
   18789             :  */
   18790             :   __Pyx_XDECREF((PyObject *)__pyx_r);
   18791             :   __pyx_t_1 = PyArray_DESCR(__pyx_v_self);
   18792             :   __Pyx_INCREF((PyObject *)((PyArray_Descr *)__pyx_t_1));
   18793             :   __pyx_r = ((PyArray_Descr *)__pyx_t_1);
   18794             :   goto __pyx_L0;
   18795             : 
   18796             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372
   18797             :  * 
   18798             :  *         @property
   18799             :  *         cdef inline dtype descr(self):             # <<<<<<<<<<<<<<
   18800             :  *             """Returns an owned reference to the dtype of the array.
   18801             :  *             """
   18802             :  */
   18803             : 
   18804             :   /* function exit code */
   18805             :   __pyx_L0:;
   18806             :   __Pyx_XGIVEREF((PyObject *)__pyx_r);
   18807             :   __Pyx_RefNannyFinishContext();
   18808             :   return __pyx_r;
   18809             : }
   18810             : 
   18811             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378
   18812             :  * 
   18813             :  *         @property
   18814             :  *         cdef inline int ndim(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18815             :  *             """Returns the number of dimensions in the array.
   18816             :  *             """
   18817             :  */
   18818             : 
   18819             : static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self) {
   18820             :   int __pyx_r;
   18821             : 
   18822             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":381
   18823             :  *             """Returns the number of dimensions in the array.
   18824             :  *             """
   18825             :  *             return PyArray_NDIM(self)             # <<<<<<<<<<<<<<
   18826             :  * 
   18827             :  *         @property
   18828             :  */
   18829             :   __pyx_r = PyArray_NDIM(__pyx_v_self);
   18830             :   goto __pyx_L0;
   18831             : 
   18832             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378
   18833             :  * 
   18834             :  *         @property
   18835             :  *         cdef inline int ndim(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18836             :  *             """Returns the number of dimensions in the array.
   18837             :  *             """
   18838             :  */
   18839             : 
   18840             :   /* function exit code */
   18841             :   __pyx_L0:;
   18842             :   return __pyx_r;
   18843             : }
   18844             : 
   18845             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384
   18846             :  * 
   18847             :  *         @property
   18848             :  *         cdef inline npy_intp *shape(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18849             :  *             """Returns a pointer to the dimensions/shape of the array.
   18850             :  *             The number of elements matches the number of dimensions of the array (ndim).
   18851             :  */
   18852             : 
   18853             : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self) {
   18854             :   npy_intp *__pyx_r;
   18855             : 
   18856             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":389
   18857             :  *             Can return NULL for 0-dimensional arrays.
   18858             :  *             """
   18859             :  *             return PyArray_DIMS(self)             # <<<<<<<<<<<<<<
   18860             :  * 
   18861             :  *         @property
   18862             :  */
   18863             :   __pyx_r = PyArray_DIMS(__pyx_v_self);
   18864             :   goto __pyx_L0;
   18865             : 
   18866             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384
   18867             :  * 
   18868             :  *         @property
   18869             :  *         cdef inline npy_intp *shape(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18870             :  *             """Returns a pointer to the dimensions/shape of the array.
   18871             :  *             The number of elements matches the number of dimensions of the array (ndim).
   18872             :  */
   18873             : 
   18874             :   /* function exit code */
   18875             :   __pyx_L0:;
   18876             :   return __pyx_r;
   18877             : }
   18878             : 
   18879             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392
   18880             :  * 
   18881             :  *         @property
   18882             :  *         cdef inline npy_intp *strides(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18883             :  *             """Returns a pointer to the strides of the array.
   18884             :  *             The number of elements matches the number of dimensions of the array (ndim).
   18885             :  */
   18886             : 
   18887             : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self) {
   18888             :   npy_intp *__pyx_r;
   18889             : 
   18890             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":396
   18891             :  *             The number of elements matches the number of dimensions of the array (ndim).
   18892             :  *             """
   18893             :  *             return PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
   18894             :  * 
   18895             :  *         @property
   18896             :  */
   18897             :   __pyx_r = PyArray_STRIDES(__pyx_v_self);
   18898             :   goto __pyx_L0;
   18899             : 
   18900             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392
   18901             :  * 
   18902             :  *         @property
   18903             :  *         cdef inline npy_intp *strides(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18904             :  *             """Returns a pointer to the strides of the array.
   18905             :  *             The number of elements matches the number of dimensions of the array (ndim).
   18906             :  */
   18907             : 
   18908             :   /* function exit code */
   18909             :   __pyx_L0:;
   18910             :   return __pyx_r;
   18911             : }
   18912             : 
   18913             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399
   18914             :  * 
   18915             :  *         @property
   18916             :  *         cdef inline npy_intp size(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18917             :  *             """Returns the total size (in number of elements) of the array.
   18918             :  *             """
   18919             :  */
   18920             : 
   18921             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self) {
   18922             :   npy_intp __pyx_r;
   18923             : 
   18924             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":402
   18925             :  *             """Returns the total size (in number of elements) of the array.
   18926             :  *             """
   18927             :  *             return PyArray_SIZE(self)             # <<<<<<<<<<<<<<
   18928             :  * 
   18929             :  *         @property
   18930             :  */
   18931             :   __pyx_r = PyArray_SIZE(__pyx_v_self);
   18932             :   goto __pyx_L0;
   18933             : 
   18934             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399
   18935             :  * 
   18936             :  *         @property
   18937             :  *         cdef inline npy_intp size(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18938             :  *             """Returns the total size (in number of elements) of the array.
   18939             :  *             """
   18940             :  */
   18941             : 
   18942             :   /* function exit code */
   18943             :   __pyx_L0:;
   18944             :   return __pyx_r;
   18945             : }
   18946             : 
   18947             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405
   18948             :  * 
   18949             :  *         @property
   18950             :  *         cdef inline char* data(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18951             :  *             """The pointer to the data buffer as a char*.
   18952             :  *             This is provided for legacy reasons to avoid direct struct field access.
   18953             :  */
   18954             : 
   18955             : static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self) {
   18956             :   char *__pyx_r;
   18957             : 
   18958             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":411
   18959             :  *             of `PyArray_DATA()` instead, which returns a 'void*'.
   18960             :  *             """
   18961             :  *             return PyArray_BYTES(self)             # <<<<<<<<<<<<<<
   18962             :  * 
   18963             :  * 
   18964             :  */
   18965             :   __pyx_r = PyArray_BYTES(__pyx_v_self);
   18966             :   goto __pyx_L0;
   18967             : 
   18968             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405
   18969             :  * 
   18970             :  *         @property
   18971             :  *         cdef inline char* data(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18972             :  *             """The pointer to the data buffer as a char*.
   18973             :  *             This is provided for legacy reasons to avoid direct struct field access.
   18974             :  */
   18975             : 
   18976             :   /* function exit code */
   18977             :   __pyx_L0:;
   18978             :   return __pyx_r;
   18979             : }
   18980             : 
   18981             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":806
   18982             :  * ctypedef long double complex clongdouble_t
   18983             :  * 
   18984             :  * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
   18985             :  *     return PyArray_MultiIterNew(1, <void*>a)
   18986             :  * 
   18987             :  */
   18988             : 
   18989             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
   18990             :   PyObject *__pyx_r = NULL;
   18991             :   __Pyx_RefNannyDeclarations
   18992             :   PyObject *__pyx_t_1 = NULL;
   18993             :   int __pyx_lineno = 0;
   18994             :   const char *__pyx_filename = NULL;
   18995             :   int __pyx_clineno = 0;
   18996             :   __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 1);
   18997             : 
   18998             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":807
   18999             :  * 
   19000             :  * cdef inline object PyArray_MultiIterNew1(a):
   19001             :  *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
   19002             :  * 
   19003             :  * cdef inline object PyArray_MultiIterNew2(a, b):
   19004             :  */
   19005             :   __Pyx_XDECREF(__pyx_r);
   19006             :   __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 807, __pyx_L1_error)
   19007             :   __Pyx_GOTREF(__pyx_t_1);
   19008             :   __pyx_r = __pyx_t_1;
   19009             :   __pyx_t_1 = 0;
   19010             :   goto __pyx_L0;
   19011             : 
   19012             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":806
   19013             :  * ctypedef long double complex clongdouble_t
   19014             :  * 
   19015             :  * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
   19016             :  *     return PyArray_MultiIterNew(1, <void*>a)
   19017             :  * 
   19018             :  */
   19019             : 
   19020             :   /* function exit code */
   19021             :   __pyx_L1_error:;
   19022             :   __Pyx_XDECREF(__pyx_t_1);
   19023             :   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19024             :   __pyx_r = 0;
   19025             :   __pyx_L0:;
   19026             :   __Pyx_XGIVEREF(__pyx_r);
   19027             :   __Pyx_RefNannyFinishContext();
   19028             :   return __pyx_r;
   19029             : }
   19030             : 
   19031             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":809
   19032             :  *     return PyArray_MultiIterNew(1, <void*>a)
   19033             :  * 
   19034             :  * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
   19035             :  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
   19036             :  * 
   19037             :  */
   19038             : 
   19039             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
   19040             :   PyObject *__pyx_r = NULL;
   19041             :   __Pyx_RefNannyDeclarations
   19042             :   PyObject *__pyx_t_1 = NULL;
   19043             :   int __pyx_lineno = 0;
   19044             :   const char *__pyx_filename = NULL;
   19045             :   int __pyx_clineno = 0;
   19046             :   __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 1);
   19047             : 
   19048             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":810
   19049             :  * 
   19050             :  * cdef inline object PyArray_MultiIterNew2(a, b):
   19051             :  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
   19052             :  * 
   19053             :  * cdef inline object PyArray_MultiIterNew3(a, b, c):
   19054             :  */
   19055             :   __Pyx_XDECREF(__pyx_r);
   19056             :   __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 810, __pyx_L1_error)
   19057             :   __Pyx_GOTREF(__pyx_t_1);
   19058             :   __pyx_r = __pyx_t_1;
   19059             :   __pyx_t_1 = 0;
   19060             :   goto __pyx_L0;
   19061             : 
   19062             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":809
   19063             :  *     return PyArray_MultiIterNew(1, <void*>a)
   19064             :  * 
   19065             :  * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
   19066             :  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
   19067             :  * 
   19068             :  */
   19069             : 
   19070             :   /* function exit code */
   19071             :   __pyx_L1_error:;
   19072             :   __Pyx_XDECREF(__pyx_t_1);
   19073             :   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19074             :   __pyx_r = 0;
   19075             :   __pyx_L0:;
   19076             :   __Pyx_XGIVEREF(__pyx_r);
   19077             :   __Pyx_RefNannyFinishContext();
   19078             :   return __pyx_r;
   19079             : }
   19080             : 
   19081             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":812
   19082             :  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
   19083             :  * 
   19084             :  * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
   19085             :  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
   19086             :  * 
   19087             :  */
   19088             : 
   19089             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
   19090             :   PyObject *__pyx_r = NULL;
   19091             :   __Pyx_RefNannyDeclarations
   19092             :   PyObject *__pyx_t_1 = NULL;
   19093             :   int __pyx_lineno = 0;
   19094             :   const char *__pyx_filename = NULL;
   19095             :   int __pyx_clineno = 0;
   19096             :   __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 1);
   19097             : 
   19098             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":813
   19099             :  * 
   19100             :  * cdef inline object PyArray_MultiIterNew3(a, b, c):
   19101             :  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
   19102             :  * 
   19103             :  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
   19104             :  */
   19105             :   __Pyx_XDECREF(__pyx_r);
   19106             :   __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 813, __pyx_L1_error)
   19107             :   __Pyx_GOTREF(__pyx_t_1);
   19108             :   __pyx_r = __pyx_t_1;
   19109             :   __pyx_t_1 = 0;
   19110             :   goto __pyx_L0;
   19111             : 
   19112             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":812
   19113             :  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
   19114             :  * 
   19115             :  * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
   19116             :  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
   19117             :  * 
   19118             :  */
   19119             : 
   19120             :   /* function exit code */
   19121             :   __pyx_L1_error:;
   19122             :   __Pyx_XDECREF(__pyx_t_1);
   19123             :   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19124             :   __pyx_r = 0;
   19125             :   __pyx_L0:;
   19126             :   __Pyx_XGIVEREF(__pyx_r);
   19127             :   __Pyx_RefNannyFinishContext();
   19128             :   return __pyx_r;
   19129             : }
   19130             : 
   19131             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":815
   19132             :  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
   19133             :  * 
   19134             :  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
   19135             :  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
   19136             :  * 
   19137             :  */
   19138             : 
   19139             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
   19140             :   PyObject *__pyx_r = NULL;
   19141             :   __Pyx_RefNannyDeclarations
   19142             :   PyObject *__pyx_t_1 = NULL;
   19143             :   int __pyx_lineno = 0;
   19144             :   const char *__pyx_filename = NULL;
   19145             :   int __pyx_clineno = 0;
   19146             :   __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 1);
   19147             : 
   19148             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":816
   19149             :  * 
   19150             :  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
   19151             :  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
   19152             :  * 
   19153             :  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
   19154             :  */
   19155             :   __Pyx_XDECREF(__pyx_r);
   19156             :   __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 816, __pyx_L1_error)
   19157             :   __Pyx_GOTREF(__pyx_t_1);
   19158             :   __pyx_r = __pyx_t_1;
   19159             :   __pyx_t_1 = 0;
   19160             :   goto __pyx_L0;
   19161             : 
   19162             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":815
   19163             :  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
   19164             :  * 
   19165             :  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
   19166             :  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
   19167             :  * 
   19168             :  */
   19169             : 
   19170             :   /* function exit code */
   19171             :   __pyx_L1_error:;
   19172             :   __Pyx_XDECREF(__pyx_t_1);
   19173             :   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19174             :   __pyx_r = 0;
   19175             :   __pyx_L0:;
   19176             :   __Pyx_XGIVEREF(__pyx_r);
   19177             :   __Pyx_RefNannyFinishContext();
   19178             :   return __pyx_r;
   19179             : }
   19180             : 
   19181             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":818
   19182             :  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
   19183             :  * 
   19184             :  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
   19185             :  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
   19186             :  * 
   19187             :  */
   19188             : 
   19189             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
   19190             :   PyObject *__pyx_r = NULL;
   19191             :   __Pyx_RefNannyDeclarations
   19192             :   PyObject *__pyx_t_1 = NULL;
   19193             :   int __pyx_lineno = 0;
   19194             :   const char *__pyx_filename = NULL;
   19195             :   int __pyx_clineno = 0;
   19196             :   __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 1);
   19197             : 
   19198             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":819
   19199             :  * 
   19200             :  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
   19201             :  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
   19202             :  * 
   19203             :  * cdef inline tuple PyDataType_SHAPE(dtype d):
   19204             :  */
   19205             :   __Pyx_XDECREF(__pyx_r);
   19206             :   __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 819, __pyx_L1_error)
   19207             :   __Pyx_GOTREF(__pyx_t_1);
   19208             :   __pyx_r = __pyx_t_1;
   19209             :   __pyx_t_1 = 0;
   19210             :   goto __pyx_L0;
   19211             : 
   19212             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":818
   19213             :  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
   19214             :  * 
   19215             :  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
   19216             :  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
   19217             :  * 
   19218             :  */
   19219             : 
   19220             :   /* function exit code */
   19221             :   __pyx_L1_error:;
   19222             :   __Pyx_XDECREF(__pyx_t_1);
   19223             :   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19224             :   __pyx_r = 0;
   19225             :   __pyx_L0:;
   19226             :   __Pyx_XGIVEREF(__pyx_r);
   19227             :   __Pyx_RefNannyFinishContext();
   19228             :   return __pyx_r;
   19229             : }
   19230             : 
   19231             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":821
   19232             :  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
   19233             :  * 
   19234             :  * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
   19235             :  *     if PyDataType_HASSUBARRAY(d):
   19236             :  *         return <tuple>d.subarray.shape
   19237             :  */
   19238             : 
   19239             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
   19240             :   PyObject *__pyx_r = NULL;
   19241             :   __Pyx_RefNannyDeclarations
   19242             :   int __pyx_t_1;
   19243             :   PyObject *__pyx_t_2;
   19244             :   __Pyx_RefNannySetupContext("PyDataType_SHAPE", 1);
   19245             : 
   19246             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822
   19247             :  * 
   19248             :  * cdef inline tuple PyDataType_SHAPE(dtype d):
   19249             :  *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
   19250             :  *         return <tuple>d.subarray.shape
   19251             :  *     else:
   19252             :  */
   19253             :   __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d);
   19254             :   if (__pyx_t_1) {
   19255             : 
   19256             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":823
   19257             :  * cdef inline tuple PyDataType_SHAPE(dtype d):
   19258             :  *     if PyDataType_HASSUBARRAY(d):
   19259             :  *         return <tuple>d.subarray.shape             # <<<<<<<<<<<<<<
   19260             :  *     else:
   19261             :  *         return ()
   19262             :  */
   19263             :     __Pyx_XDECREF(__pyx_r);
   19264             :     __pyx_t_2 = __pyx_f_5numpy_5dtype_8subarray_subarray(__pyx_v_d)->shape;
   19265             :     __Pyx_INCREF(((PyObject*)__pyx_t_2));
   19266             :     __pyx_r = ((PyObject*)__pyx_t_2);
   19267             :     goto __pyx_L0;
   19268             : 
   19269             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822
   19270             :  * 
   19271             :  * cdef inline tuple PyDataType_SHAPE(dtype d):
   19272             :  *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
   19273             :  *         return <tuple>d.subarray.shape
   19274             :  *     else:
   19275             :  */
   19276             :   }
   19277             : 
   19278             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":825
   19279             :  *         return <tuple>d.subarray.shape
   19280             :  *     else:
   19281             :  *         return ()             # <<<<<<<<<<<<<<
   19282             :  * 
   19283             :  * 
   19284             :  */
   19285             :   /*else*/ {
   19286             :     __Pyx_XDECREF(__pyx_r);
   19287             :     __Pyx_INCREF(__pyx_empty_tuple);
   19288             :     __pyx_r = __pyx_empty_tuple;
   19289             :     goto __pyx_L0;
   19290             :   }
   19291             : 
   19292             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":821
   19293             :  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
   19294             :  * 
   19295             :  * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
   19296             :  *     if PyDataType_HASSUBARRAY(d):
   19297             :  *         return <tuple>d.subarray.shape
   19298             :  */
   19299             : 
   19300             :   /* function exit code */
   19301             :   __pyx_L0:;
   19302             :   __Pyx_XGIVEREF(__pyx_r);
   19303             :   __Pyx_RefNannyFinishContext();
   19304             :   return __pyx_r;
   19305             : }
   19306             : 
   19307             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1009
   19308             :  *     int _import_umath() except -1
   19309             :  * 
   19310             :  * cdef inline void set_array_base(ndarray arr, object base) except *:             # <<<<<<<<<<<<<<
   19311             :  *     Py_INCREF(base) # important to do this before stealing the reference below!
   19312             :  *     PyArray_SetBaseObject(arr, base)
   19313             :  */
   19314             : 
   19315             : static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
   19316             :   int __pyx_t_1;
   19317             :   int __pyx_lineno = 0;
   19318             :   const char *__pyx_filename = NULL;
   19319             :   int __pyx_clineno = 0;
   19320             : 
   19321             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1010
   19322             :  * 
   19323             :  * cdef inline void set_array_base(ndarray arr, object base) except *:
   19324             :  *     Py_INCREF(base) # important to do this before stealing the reference below!             # <<<<<<<<<<<<<<
   19325             :  *     PyArray_SetBaseObject(arr, base)
   19326             :  * 
   19327             :  */
   19328             :   Py_INCREF(__pyx_v_base);
   19329             : 
   19330             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1011
   19331             :  * cdef inline void set_array_base(ndarray arr, object base) except *:
   19332             :  *     Py_INCREF(base) # important to do this before stealing the reference below!
   19333             :  *     PyArray_SetBaseObject(arr, base)             # <<<<<<<<<<<<<<
   19334             :  * 
   19335             :  * cdef inline object get_array_base(ndarray arr):
   19336             :  */
   19337             :   __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 1011, __pyx_L1_error)
   19338             : 
   19339             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1009
   19340             :  *     int _import_umath() except -1
   19341             :  * 
   19342             :  * cdef inline void set_array_base(ndarray arr, object base) except *:             # <<<<<<<<<<<<<<
   19343             :  *     Py_INCREF(base) # important to do this before stealing the reference below!
   19344             :  *     PyArray_SetBaseObject(arr, base)
   19345             :  */
   19346             : 
   19347             :   /* function exit code */
   19348             :   goto __pyx_L0;
   19349             :   __pyx_L1_error:;
   19350             :   __Pyx_AddTraceback("numpy.set_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19351             :   __pyx_L0:;
   19352             : }
   19353             : 
   19354             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013
   19355             :  *     PyArray_SetBaseObject(arr, base)
   19356             :  * 
   19357             :  * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
   19358             :  *     base = PyArray_BASE(arr)
   19359             :  *     if base is NULL:
   19360             :  */
   19361             : 
   19362             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
   19363             :   PyObject *__pyx_v_base;
   19364             :   PyObject *__pyx_r = NULL;
   19365             :   __Pyx_RefNannyDeclarations
   19366             :   int __pyx_t_1;
   19367             :   __Pyx_RefNannySetupContext("get_array_base", 1);
   19368             : 
   19369             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1014
   19370             :  * 
   19371             :  * cdef inline object get_array_base(ndarray arr):
   19372             :  *     base = PyArray_BASE(arr)             # <<<<<<<<<<<<<<
   19373             :  *     if base is NULL:
   19374             :  *         return None
   19375             :  */
   19376             :   __pyx_v_base = PyArray_BASE(__pyx_v_arr);
   19377             : 
   19378             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1015
   19379             :  * cdef inline object get_array_base(ndarray arr):
   19380             :  *     base = PyArray_BASE(arr)
   19381             :  *     if base is NULL:             # <<<<<<<<<<<<<<
   19382             :  *         return None
   19383             :  *     return <object>base
   19384             :  */
   19385             :   __pyx_t_1 = (__pyx_v_base == NULL);
   19386             :   if (__pyx_t_1) {
   19387             : 
   19388             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1016
   19389             :  *     base = PyArray_BASE(arr)
   19390             :  *     if base is NULL:
   19391             :  *         return None             # <<<<<<<<<<<<<<
   19392             :  *     return <object>base
   19393             :  * 
   19394             :  */
   19395             :     __Pyx_XDECREF(__pyx_r);
   19396             :     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   19397             :     goto __pyx_L0;
   19398             : 
   19399             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1015
   19400             :  * cdef inline object get_array_base(ndarray arr):
   19401             :  *     base = PyArray_BASE(arr)
   19402             :  *     if base is NULL:             # <<<<<<<<<<<<<<
   19403             :  *         return None
   19404             :  *     return <object>base
   19405             :  */
   19406             :   }
   19407             : 
   19408             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1017
   19409             :  *     if base is NULL:
   19410             :  *         return None
   19411             :  *     return <object>base             # <<<<<<<<<<<<<<
   19412             :  * 
   19413             :  * # Versions of the import_* functions which are more suitable for
   19414             :  */
   19415             :   __Pyx_XDECREF(__pyx_r);
   19416             :   __Pyx_INCREF(((PyObject *)__pyx_v_base));
   19417             :   __pyx_r = ((PyObject *)__pyx_v_base);
   19418             :   goto __pyx_L0;
   19419             : 
   19420             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013
   19421             :  *     PyArray_SetBaseObject(arr, base)
   19422             :  * 
   19423             :  * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
   19424             :  *     base = PyArray_BASE(arr)
   19425             :  *     if base is NULL:
   19426             :  */
   19427             : 
   19428             :   /* function exit code */
   19429             :   __pyx_L0:;
   19430             :   __Pyx_XGIVEREF(__pyx_r);
   19431             :   __Pyx_RefNannyFinishContext();
   19432             :   return __pyx_r;
   19433             : }
   19434             : 
   19435             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1021
   19436             :  * # Versions of the import_* functions which are more suitable for
   19437             :  * # Cython code.
   19438             :  * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
   19439             :  *     try:
   19440             :  *         __pyx_import_array()
   19441             :  */
   19442             : 
   19443           3 : static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
   19444           3 :   int __pyx_r;
   19445             :   __Pyx_RefNannyDeclarations
   19446           3 :   PyObject *__pyx_t_1 = NULL;
   19447           3 :   PyObject *__pyx_t_2 = NULL;
   19448           3 :   PyObject *__pyx_t_3 = NULL;
   19449           3 :   int __pyx_t_4;
   19450           3 :   PyObject *__pyx_t_5 = NULL;
   19451           3 :   PyObject *__pyx_t_6 = NULL;
   19452           3 :   PyObject *__pyx_t_7 = NULL;
   19453           3 :   PyObject *__pyx_t_8 = NULL;
   19454           3 :   int __pyx_lineno = 0;
   19455           3 :   const char *__pyx_filename = NULL;
   19456           3 :   int __pyx_clineno = 0;
   19457           3 :   __Pyx_RefNannySetupContext("import_array", 1);
   19458             : 
   19459             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022
   19460             :  * # Cython code.
   19461             :  * cdef inline int import_array() except -1:
   19462             :  *     try:             # <<<<<<<<<<<<<<
   19463             :  *         __pyx_import_array()
   19464             :  *     except Exception:
   19465             :  */
   19466             :   {
   19467           3 :     __Pyx_PyThreadState_declare
   19468           3 :     __Pyx_PyThreadState_assign
   19469           3 :     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
   19470           3 :     __Pyx_XGOTREF(__pyx_t_1);
   19471           3 :     __Pyx_XGOTREF(__pyx_t_2);
   19472           3 :     __Pyx_XGOTREF(__pyx_t_3);
   19473             :     /*try:*/ {
   19474             : 
   19475             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1023
   19476             :  * cdef inline int import_array() except -1:
   19477             :  *     try:
   19478             :  *         __pyx_import_array()             # <<<<<<<<<<<<<<
   19479             :  *     except Exception:
   19480             :  *         raise ImportError("numpy._core.multiarray failed to import")
   19481             :  */
   19482           3 :       __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1023, __pyx_L3_error)
   19483             : 
   19484             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022
   19485             :  * # Cython code.
   19486             :  * cdef inline int import_array() except -1:
   19487             :  *     try:             # <<<<<<<<<<<<<<
   19488             :  *         __pyx_import_array()
   19489             :  *     except Exception:
   19490             :  */
   19491             :     }
   19492           3 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   19493           3 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   19494           3 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   19495           3 :     goto __pyx_L8_try_end;
   19496           0 :     __pyx_L3_error:;
   19497             : 
   19498             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1024
   19499             :  *     try:
   19500             :  *         __pyx_import_array()
   19501             :  *     except Exception:             # <<<<<<<<<<<<<<
   19502             :  *         raise ImportError("numpy._core.multiarray failed to import")
   19503             :  * 
   19504             :  */
   19505           0 :     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
   19506           0 :     if (__pyx_t_4) {
   19507           0 :       __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19508           0 :       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1024, __pyx_L5_except_error)
   19509           0 :       __Pyx_XGOTREF(__pyx_t_5);
   19510           0 :       __Pyx_XGOTREF(__pyx_t_6);
   19511           0 :       __Pyx_XGOTREF(__pyx_t_7);
   19512             : 
   19513             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025
   19514             :  *         __pyx_import_array()
   19515             :  *     except Exception:
   19516             :  *         raise ImportError("numpy._core.multiarray failed to import")             # <<<<<<<<<<<<<<
   19517             :  * 
   19518             :  * cdef inline int import_umath() except -1:
   19519             :  */
   19520           0 :       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1025, __pyx_L5_except_error)
   19521           0 :       __Pyx_GOTREF(__pyx_t_8);
   19522           0 :       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
   19523           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   19524           0 :       __PYX_ERR(2, 1025, __pyx_L5_except_error)
   19525             :     }
   19526           0 :     goto __pyx_L5_except_error;
   19527             : 
   19528             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022
   19529             :  * # Cython code.
   19530             :  * cdef inline int import_array() except -1:
   19531             :  *     try:             # <<<<<<<<<<<<<<
   19532             :  *         __pyx_import_array()
   19533             :  *     except Exception:
   19534             :  */
   19535           0 :     __pyx_L5_except_error:;
   19536           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   19537           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   19538           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   19539           0 :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   19540           0 :     goto __pyx_L1_error;
   19541           3 :     __pyx_L8_try_end:;
   19542             :   }
   19543             : 
   19544             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1021
   19545             :  * # Versions of the import_* functions which are more suitable for
   19546             :  * # Cython code.
   19547             :  * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
   19548             :  *     try:
   19549             :  *         __pyx_import_array()
   19550             :  */
   19551             : 
   19552             :   /* function exit code */
   19553           3 :   __pyx_r = 0;
   19554           3 :   goto __pyx_L0;
   19555           0 :   __pyx_L1_error:;
   19556           0 :   __Pyx_XDECREF(__pyx_t_5);
   19557           0 :   __Pyx_XDECREF(__pyx_t_6);
   19558           0 :   __Pyx_XDECREF(__pyx_t_7);
   19559           0 :   __Pyx_XDECREF(__pyx_t_8);
   19560           0 :   __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19561           0 :   __pyx_r = -1;
   19562           3 :   __pyx_L0:;
   19563           3 :   __Pyx_RefNannyFinishContext();
   19564           3 :   return __pyx_r;
   19565             : }
   19566             : 
   19567             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1027
   19568             :  *         raise ImportError("numpy._core.multiarray failed to import")
   19569             :  * 
   19570             :  * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
   19571             :  *     try:
   19572             :  *         _import_umath()
   19573             :  */
   19574             : 
   19575             : static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
   19576             :   int __pyx_r;
   19577             :   __Pyx_RefNannyDeclarations
   19578             :   PyObject *__pyx_t_1 = NULL;
   19579             :   PyObject *__pyx_t_2 = NULL;
   19580             :   PyObject *__pyx_t_3 = NULL;
   19581             :   int __pyx_t_4;
   19582             :   PyObject *__pyx_t_5 = NULL;
   19583             :   PyObject *__pyx_t_6 = NULL;
   19584             :   PyObject *__pyx_t_7 = NULL;
   19585             :   PyObject *__pyx_t_8 = NULL;
   19586             :   int __pyx_lineno = 0;
   19587             :   const char *__pyx_filename = NULL;
   19588             :   int __pyx_clineno = 0;
   19589             :   __Pyx_RefNannySetupContext("import_umath", 1);
   19590             : 
   19591             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028
   19592             :  * 
   19593             :  * cdef inline int import_umath() except -1:
   19594             :  *     try:             # <<<<<<<<<<<<<<
   19595             :  *         _import_umath()
   19596             :  *     except Exception:
   19597             :  */
   19598             :   {
   19599             :     __Pyx_PyThreadState_declare
   19600             :     __Pyx_PyThreadState_assign
   19601             :     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
   19602             :     __Pyx_XGOTREF(__pyx_t_1);
   19603             :     __Pyx_XGOTREF(__pyx_t_2);
   19604             :     __Pyx_XGOTREF(__pyx_t_3);
   19605             :     /*try:*/ {
   19606             : 
   19607             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1029
   19608             :  * cdef inline int import_umath() except -1:
   19609             :  *     try:
   19610             :  *         _import_umath()             # <<<<<<<<<<<<<<
   19611             :  *     except Exception:
   19612             :  *         raise ImportError("numpy._core.umath failed to import")
   19613             :  */
   19614             :       __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1029, __pyx_L3_error)
   19615             : 
   19616             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028
   19617             :  * 
   19618             :  * cdef inline int import_umath() except -1:
   19619             :  *     try:             # <<<<<<<<<<<<<<
   19620             :  *         _import_umath()
   19621             :  *     except Exception:
   19622             :  */
   19623             :     }
   19624             :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   19625             :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   19626             :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   19627             :     goto __pyx_L8_try_end;
   19628             :     __pyx_L3_error:;
   19629             : 
   19630             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1030
   19631             :  *     try:
   19632             :  *         _import_umath()
   19633             :  *     except Exception:             # <<<<<<<<<<<<<<
   19634             :  *         raise ImportError("numpy._core.umath failed to import")
   19635             :  * 
   19636             :  */
   19637             :     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
   19638             :     if (__pyx_t_4) {
   19639             :       __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19640             :       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1030, __pyx_L5_except_error)
   19641             :       __Pyx_XGOTREF(__pyx_t_5);
   19642             :       __Pyx_XGOTREF(__pyx_t_6);
   19643             :       __Pyx_XGOTREF(__pyx_t_7);
   19644             : 
   19645             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031
   19646             :  *         _import_umath()
   19647             :  *     except Exception:
   19648             :  *         raise ImportError("numpy._core.umath failed to import")             # <<<<<<<<<<<<<<
   19649             :  * 
   19650             :  * cdef inline int import_ufunc() except -1:
   19651             :  */
   19652             :       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1031, __pyx_L5_except_error)
   19653             :       __Pyx_GOTREF(__pyx_t_8);
   19654             :       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
   19655             :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   19656             :       __PYX_ERR(2, 1031, __pyx_L5_except_error)
   19657             :     }
   19658             :     goto __pyx_L5_except_error;
   19659             : 
   19660             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028
   19661             :  * 
   19662             :  * cdef inline int import_umath() except -1:
   19663             :  *     try:             # <<<<<<<<<<<<<<
   19664             :  *         _import_umath()
   19665             :  *     except Exception:
   19666             :  */
   19667             :     __pyx_L5_except_error:;
   19668             :     __Pyx_XGIVEREF(__pyx_t_1);
   19669             :     __Pyx_XGIVEREF(__pyx_t_2);
   19670             :     __Pyx_XGIVEREF(__pyx_t_3);
   19671             :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   19672             :     goto __pyx_L1_error;
   19673             :     __pyx_L8_try_end:;
   19674             :   }
   19675             : 
   19676             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1027
   19677             :  *         raise ImportError("numpy._core.multiarray failed to import")
   19678             :  * 
   19679             :  * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
   19680             :  *     try:
   19681             :  *         _import_umath()
   19682             :  */
   19683             : 
   19684             :   /* function exit code */
   19685             :   __pyx_r = 0;
   19686             :   goto __pyx_L0;
   19687             :   __pyx_L1_error:;
   19688             :   __Pyx_XDECREF(__pyx_t_5);
   19689             :   __Pyx_XDECREF(__pyx_t_6);
   19690             :   __Pyx_XDECREF(__pyx_t_7);
   19691             :   __Pyx_XDECREF(__pyx_t_8);
   19692             :   __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19693             :   __pyx_r = -1;
   19694             :   __pyx_L0:;
   19695             :   __Pyx_RefNannyFinishContext();
   19696             :   return __pyx_r;
   19697             : }
   19698             : 
   19699             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1033
   19700             :  *         raise ImportError("numpy._core.umath failed to import")
   19701             :  * 
   19702             :  * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
   19703             :  *     try:
   19704             :  *         _import_umath()
   19705             :  */
   19706             : 
   19707             : static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
   19708             :   int __pyx_r;
   19709             :   __Pyx_RefNannyDeclarations
   19710             :   PyObject *__pyx_t_1 = NULL;
   19711             :   PyObject *__pyx_t_2 = NULL;
   19712             :   PyObject *__pyx_t_3 = NULL;
   19713             :   int __pyx_t_4;
   19714             :   PyObject *__pyx_t_5 = NULL;
   19715             :   PyObject *__pyx_t_6 = NULL;
   19716             :   PyObject *__pyx_t_7 = NULL;
   19717             :   PyObject *__pyx_t_8 = NULL;
   19718             :   int __pyx_lineno = 0;
   19719             :   const char *__pyx_filename = NULL;
   19720             :   int __pyx_clineno = 0;
   19721             :   __Pyx_RefNannySetupContext("import_ufunc", 1);
   19722             : 
   19723             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034
   19724             :  * 
   19725             :  * cdef inline int import_ufunc() except -1:
   19726             :  *     try:             # <<<<<<<<<<<<<<
   19727             :  *         _import_umath()
   19728             :  *     except Exception:
   19729             :  */
   19730             :   {
   19731             :     __Pyx_PyThreadState_declare
   19732             :     __Pyx_PyThreadState_assign
   19733             :     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
   19734             :     __Pyx_XGOTREF(__pyx_t_1);
   19735             :     __Pyx_XGOTREF(__pyx_t_2);
   19736             :     __Pyx_XGOTREF(__pyx_t_3);
   19737             :     /*try:*/ {
   19738             : 
   19739             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1035
   19740             :  * cdef inline int import_ufunc() except -1:
   19741             :  *     try:
   19742             :  *         _import_umath()             # <<<<<<<<<<<<<<
   19743             :  *     except Exception:
   19744             :  *         raise ImportError("numpy._core.umath failed to import")
   19745             :  */
   19746             :       __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1035, __pyx_L3_error)
   19747             : 
   19748             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034
   19749             :  * 
   19750             :  * cdef inline int import_ufunc() except -1:
   19751             :  *     try:             # <<<<<<<<<<<<<<
   19752             :  *         _import_umath()
   19753             :  *     except Exception:
   19754             :  */
   19755             :     }
   19756             :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   19757             :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   19758             :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   19759             :     goto __pyx_L8_try_end;
   19760             :     __pyx_L3_error:;
   19761             : 
   19762             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1036
   19763             :  *     try:
   19764             :  *         _import_umath()
   19765             :  *     except Exception:             # <<<<<<<<<<<<<<
   19766             :  *         raise ImportError("numpy._core.umath failed to import")
   19767             :  * 
   19768             :  */
   19769             :     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
   19770             :     if (__pyx_t_4) {
   19771             :       __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19772             :       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1036, __pyx_L5_except_error)
   19773             :       __Pyx_XGOTREF(__pyx_t_5);
   19774             :       __Pyx_XGOTREF(__pyx_t_6);
   19775             :       __Pyx_XGOTREF(__pyx_t_7);
   19776             : 
   19777             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1037
   19778             :  *         _import_umath()
   19779             :  *     except Exception:
   19780             :  *         raise ImportError("numpy._core.umath failed to import")             # <<<<<<<<<<<<<<
   19781             :  * 
   19782             :  * 
   19783             :  */
   19784             :       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1037, __pyx_L5_except_error)
   19785             :       __Pyx_GOTREF(__pyx_t_8);
   19786             :       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
   19787             :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   19788             :       __PYX_ERR(2, 1037, __pyx_L5_except_error)
   19789             :     }
   19790             :     goto __pyx_L5_except_error;
   19791             : 
   19792             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034
   19793             :  * 
   19794             :  * cdef inline int import_ufunc() except -1:
   19795             :  *     try:             # <<<<<<<<<<<<<<
   19796             :  *         _import_umath()
   19797             :  *     except Exception:
   19798             :  */
   19799             :     __pyx_L5_except_error:;
   19800             :     __Pyx_XGIVEREF(__pyx_t_1);
   19801             :     __Pyx_XGIVEREF(__pyx_t_2);
   19802             :     __Pyx_XGIVEREF(__pyx_t_3);
   19803             :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   19804             :     goto __pyx_L1_error;
   19805             :     __pyx_L8_try_end:;
   19806             :   }
   19807             : 
   19808             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1033
   19809             :  *         raise ImportError("numpy._core.umath failed to import")
   19810             :  * 
   19811             :  * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
   19812             :  *     try:
   19813             :  *         _import_umath()
   19814             :  */
   19815             : 
   19816             :   /* function exit code */
   19817             :   __pyx_r = 0;
   19818             :   goto __pyx_L0;
   19819             :   __pyx_L1_error:;
   19820             :   __Pyx_XDECREF(__pyx_t_5);
   19821             :   __Pyx_XDECREF(__pyx_t_6);
   19822             :   __Pyx_XDECREF(__pyx_t_7);
   19823             :   __Pyx_XDECREF(__pyx_t_8);
   19824             :   __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19825             :   __pyx_r = -1;
   19826             :   __pyx_L0:;
   19827             :   __Pyx_RefNannyFinishContext();
   19828             :   return __pyx_r;
   19829             : }
   19830             : 
   19831             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040
   19832             :  * 
   19833             :  * 
   19834             :  * cdef inline bint is_timedelta64_object(object obj) noexcept:             # <<<<<<<<<<<<<<
   19835             :  *     """
   19836             :  *     Cython equivalent of `isinstance(obj, np.timedelta64)`
   19837             :  */
   19838             : 
   19839             : static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
   19840             :   int __pyx_r;
   19841             : 
   19842             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1052
   19843             :  *     bool
   19844             :  *     """
   19845             :  *     return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type)             # <<<<<<<<<<<<<<
   19846             :  * 
   19847             :  * 
   19848             :  */
   19849             :   __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
   19850             :   goto __pyx_L0;
   19851             : 
   19852             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040
   19853             :  * 
   19854             :  * 
   19855             :  * cdef inline bint is_timedelta64_object(object obj) noexcept:             # <<<<<<<<<<<<<<
   19856             :  *     """
   19857             :  *     Cython equivalent of `isinstance(obj, np.timedelta64)`
   19858             :  */
   19859             : 
   19860             :   /* function exit code */
   19861             :   __pyx_L0:;
   19862             :   return __pyx_r;
   19863             : }
   19864             : 
   19865             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055
   19866             :  * 
   19867             :  * 
   19868             :  * cdef inline bint is_datetime64_object(object obj) noexcept:             # <<<<<<<<<<<<<<
   19869             :  *     """
   19870             :  *     Cython equivalent of `isinstance(obj, np.datetime64)`
   19871             :  */
   19872             : 
   19873             : static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
   19874             :   int __pyx_r;
   19875             : 
   19876             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1067
   19877             :  *     bool
   19878             :  *     """
   19879             :  *     return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type)             # <<<<<<<<<<<<<<
   19880             :  * 
   19881             :  * 
   19882             :  */
   19883             :   __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
   19884             :   goto __pyx_L0;
   19885             : 
   19886             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055
   19887             :  * 
   19888             :  * 
   19889             :  * cdef inline bint is_datetime64_object(object obj) noexcept:             # <<<<<<<<<<<<<<
   19890             :  *     """
   19891             :  *     Cython equivalent of `isinstance(obj, np.datetime64)`
   19892             :  */
   19893             : 
   19894             :   /* function exit code */
   19895             :   __pyx_L0:;
   19896             :   return __pyx_r;
   19897             : }
   19898             : 
   19899             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1070
   19900             :  * 
   19901             :  * 
   19902             :  * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
   19903             :  *     """
   19904             :  *     returns the int64 value underlying scalar numpy datetime64 object
   19905             :  */
   19906             : 
   19907             : static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
   19908             :   npy_datetime __pyx_r;
   19909             : 
   19910             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1077
   19911             :  *     also needed.  That can be found using `get_datetime64_unit`.
   19912             :  *     """
   19913             :  *     return (<PyDatetimeScalarObject*>obj).obval             # <<<<<<<<<<<<<<
   19914             :  * 
   19915             :  * 
   19916             :  */
   19917             :   __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
   19918             :   goto __pyx_L0;
   19919             : 
   19920             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1070
   19921             :  * 
   19922             :  * 
   19923             :  * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
   19924             :  *     """
   19925             :  *     returns the int64 value underlying scalar numpy datetime64 object
   19926             :  */
   19927             : 
   19928             :   /* function exit code */
   19929             :   __pyx_L0:;
   19930             :   return __pyx_r;
   19931             : }
   19932             : 
   19933             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1080
   19934             :  * 
   19935             :  * 
   19936             :  * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
   19937             :  *     """
   19938             :  *     returns the int64 value underlying scalar numpy timedelta64 object
   19939             :  */
   19940             : 
   19941             : static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
   19942             :   npy_timedelta __pyx_r;
   19943             : 
   19944             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1084
   19945             :  *     returns the int64 value underlying scalar numpy timedelta64 object
   19946             :  *     """
   19947             :  *     return (<PyTimedeltaScalarObject*>obj).obval             # <<<<<<<<<<<<<<
   19948             :  * 
   19949             :  * 
   19950             :  */
   19951             :   __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
   19952             :   goto __pyx_L0;
   19953             : 
   19954             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1080
   19955             :  * 
   19956             :  * 
   19957             :  * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
   19958             :  *     """
   19959             :  *     returns the int64 value underlying scalar numpy timedelta64 object
   19960             :  */
   19961             : 
   19962             :   /* function exit code */
   19963             :   __pyx_L0:;
   19964             :   return __pyx_r;
   19965             : }
   19966             : 
   19967             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1087
   19968             :  * 
   19969             :  * 
   19970             :  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
   19971             :  *     """
   19972             :  *     returns the unit part of the dtype for a numpy datetime64 object.
   19973             :  */
   19974             : 
   19975             : static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
   19976             :   NPY_DATETIMEUNIT __pyx_r;
   19977             : 
   19978             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1091
   19979             :  *     returns the unit part of the dtype for a numpy datetime64 object.
   19980             :  *     """
   19981             :  *     return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base             # <<<<<<<<<<<<<<
   19982             :  * 
   19983             :  * 
   19984             :  */
   19985             :   __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
   19986             :   goto __pyx_L0;
   19987             : 
   19988             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1087
   19989             :  * 
   19990             :  * 
   19991             :  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
   19992             :  *     """
   19993             :  *     returns the unit part of the dtype for a numpy datetime64 object.
   19994             :  */
   19995             : 
   19996             :   /* function exit code */
   19997             :   __pyx_L0:;
   19998             :   return __pyx_r;
   19999             : }
   20000             : 
   20001             : /* "scipy/sparse/csgraph/_matching.pyx":18
   20002             :  * 
   20003             :  * 
   20004             :  * def maximum_bipartite_matching(graph, perm_type='row'):             # <<<<<<<<<<<<<<
   20005             :  *     r"""
   20006             :  *     maximum_bipartite_matching(graph, perm_type='row')
   20007             :  */
   20008             : 
   20009             : /* Python wrapper */
   20010             : static PyObject *__pyx_pw_5scipy_6sparse_7csgraph_9_matching_1maximum_bipartite_matching(PyObject *__pyx_self, 
   20011             : #if CYTHON_METH_FASTCALL
   20012             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   20013             : #else
   20014             : PyObject *__pyx_args, PyObject *__pyx_kwds
   20015             : #endif
   20016             : ); /*proto*/
   20017             : PyDoc_STRVAR(__pyx_doc_5scipy_6sparse_7csgraph_9_matching_maximum_bipartite_matching, "\n    maximum_bipartite_matching(graph, perm_type='row')\n\n    Returns a matching of a bipartite graph whose cardinality is at least that\n    of any given matching of the graph.\n\n    Parameters\n    ----------\n    graph : sparse array or matrix\n        Input sparse in CSR format whose rows represent one partition of the\n        graph and whose columns represent the other partition. An edge between\n        two vertices is indicated by the corresponding entry in the matrix\n        existing in its sparse representation.\n    perm_type : str, {'row', 'column'}\n        Which partition to return the matching in terms of: If ``'row'``, the\n        function produces an array whose length is the number of columns in the\n        input, and whose :math:`j`'th element is the row matched to the\n        :math:`j`'th column. Conversely, if ``perm_type`` is ``'column'``, this\n        returns the columns matched to each row.\n\n    Returns\n    -------\n    perm : ndarray\n        A matching of the vertices in one of the two partitions. Unmatched\n        vertices are represented by a ``-1`` in the result.\n\n    Notes\n    -----\n    This function implements the Hopcroft--Karp algorithm [1]_. Its time\n    complexity is :math:`O(\\lvert E \\rvert \\sqrt{\\lvert V \\rvert})`, and its\n    space complexity is linear in the number of rows. In practice, this\n    asymmetry between rows and columns means that it can be more efficient to\n    transpose the input if it contains more columns than rows.\n\n    By Konig's theorem, the cardinality of the matching is also the number of\n    vertices appearing in a minimum vertex cover of the graph.\n\n    Note that if the sparse representation contains explicit zeros, these are\n    still counted as edges.\n\n    The implementation was changed in SciPy 1.4.0 to allow matching of general\n    bipartite graphs, where previous versions would assume that a perfect\n    matching existed. As such, code written against 1.4.0 will not ne""cessarily\n    work on older versions.\n\n    If multiple valid solutions are possible, output may vary with SciPy and\n    Python version.\n\n    References\n    ----------\n    .. [1] John E. Hopcroft and Richard M. Karp. \"An n^{5 / 2} Algorithm for\n           Maximum Matchings in Bipartite Graphs\" In: SIAM Journal of Computing\n           2.4 (1973), pp. 225--231. :doi:`10.1137/0202019`\n\n    Examples\n    --------\n    >>> from scipy.sparse import csr_array\n    >>> from scipy.sparse.csgraph import maximum_bipartite_matching\n\n    As a simple example, consider a bipartite graph in which the partitions\n    contain 2 and 3 elements respectively. Suppose that one partition contains\n    vertices labelled 0 and 1, and that the other partition contains vertices\n    labelled A, B, and C. Suppose that there are edges connecting 0 and C,\n    1 and A, and 1 and B. This graph would then be represented by the following\n    sparse array:\n\n    >>> graph = csr_array([[0, 0, 1], [1, 1, 0]])\n\n    Here, the 1s could be anything, as long as they end up being stored as\n    elements in the sparse array. We can now calculate maximum matchings as\n    follows:\n\n    >>> print(maximum_bipartite_matching(graph, perm_type='column'))\n    [2 0]\n    >>> print(maximum_bipartite_matching(graph, perm_type='row'))\n    [ 1 -1  0]\n\n    The first output tells us that 1 and 2 are matched with C and A\n    respectively, and the second output tells us that A, B, and C are matched\n    with 1, nothing, and 0 respectively.\n\n    Note that explicit zeros are still converted to edges. This means that a\n    different way to represent the above graph is by using the CSR structure\n    directly as follows:\n\n    >>> data = [0, 0, 0]\n    >>> indices = [2, 0, 1]\n    >>> indptr = [0, 1, 3]\n    >>> graph = csr_array((data, indices, indptr))\n    >>> print(maximum_bipartite_matching(graph, perm_type='column'))\n    [2 0]\n    >>> print(maximum_bipartite_matching(graph, perm_type='row')"")\n    [ 1 -1  0]\n\n    When one or both of the partitions are empty, the matching is empty as\n    well:\n\n    >>> graph = csr_array((2, 0))\n    >>> print(maximum_bipartite_matching(graph, perm_type='column'))\n    [-1 -1]\n    >>> print(maximum_bipartite_matching(graph, perm_type='row'))\n    []\n\n    When the input array is square, and the graph is known to admit a perfect\n    matching, i.e. a matching with the property that every vertex in the graph\n    belongs to some edge in the matching, then one can view the output as the\n    permutation of rows (or columns) turning the input array into one with the\n    property that all diagonal elements are non-empty:\n\n    >>> a = [[0, 1, 2, 0], [1, 0, 0, 1], [2, 0, 0, 3], [0, 1, 3, 0]]\n    >>> graph = csr_array(a)\n    >>> perm = maximum_bipartite_matching(graph, perm_type='row')\n    >>> print(graph[perm].toarray())\n    [[1 0 0 1]\n     [0 1 2 0]\n     [0 1 3 0]\n     [2 0 0 3]]\n\n    ");
   20018             : static PyMethodDef __pyx_mdef_5scipy_6sparse_7csgraph_9_matching_1maximum_bipartite_matching = {"maximum_bipartite_matching", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_6sparse_7csgraph_9_matching_1maximum_bipartite_matching, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5scipy_6sparse_7csgraph_9_matching_maximum_bipartite_matching};
   20019          25 : static PyObject *__pyx_pw_5scipy_6sparse_7csgraph_9_matching_1maximum_bipartite_matching(PyObject *__pyx_self, 
   20020             : #if CYTHON_METH_FASTCALL
   20021             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   20022             : #else
   20023             : PyObject *__pyx_args, PyObject *__pyx_kwds
   20024             : #endif
   20025             : ) {
   20026          25 :   PyObject *__pyx_v_graph = 0;
   20027          25 :   PyObject *__pyx_v_perm_type = 0;
   20028             :   #if !CYTHON_METH_FASTCALL
   20029             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   20030             :   #endif
   20031          25 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   20032          25 :   PyObject* values[2] = {0,0};
   20033          25 :   int __pyx_lineno = 0;
   20034          25 :   const char *__pyx_filename = NULL;
   20035          25 :   int __pyx_clineno = 0;
   20036          25 :   PyObject *__pyx_r = 0;
   20037             :   __Pyx_RefNannyDeclarations
   20038          25 :   __Pyx_RefNannySetupContext("maximum_bipartite_matching (wrapper)", 0);
   20039             :   #if !CYTHON_METH_FASTCALL
   20040             :   #if CYTHON_ASSUME_SAFE_MACROS
   20041             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   20042             :   #else
   20043             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   20044             :   #endif
   20045             :   #endif
   20046          25 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   20047             :   {
   20048          25 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_graph,&__pyx_n_s_perm_type,0};
   20049          25 :     values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_u_row)));
   20050          25 :     if (__pyx_kwds) {
   20051          20 :       Py_ssize_t kw_args;
   20052          20 :       switch (__pyx_nargs) {
   20053           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   20054          20 :         CYTHON_FALLTHROUGH;
   20055          20 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   20056          20 :         CYTHON_FALLTHROUGH;
   20057          20 :         case  0: break;
   20058           0 :         default: goto __pyx_L5_argtuple_error;
   20059             :       }
   20060          20 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   20061          20 :       switch (__pyx_nargs) {
   20062             :         case  0:
   20063           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_graph)) != 0)) {
   20064           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   20065           0 :           kw_args--;
   20066             :         }
   20067           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 18, __pyx_L3_error)
   20068           0 :         else goto __pyx_L5_argtuple_error;
   20069          20 :         CYTHON_FALLTHROUGH;
   20070             :         case  1:
   20071          20 :         if (kw_args > 0) {
   20072          20 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_perm_type);
   20073          20 :           if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   20074           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 18, __pyx_L3_error)
   20075             :         }
   20076             :       }
   20077          20 :       if (unlikely(kw_args > 0)) {
   20078           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   20079           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "maximum_bipartite_matching") < 0)) __PYX_ERR(0, 18, __pyx_L3_error)
   20080             :       }
   20081             :     } else {
   20082           5 :       switch (__pyx_nargs) {
   20083           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   20084           5 :         CYTHON_FALLTHROUGH;
   20085           5 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   20086           5 :         break;
   20087           0 :         default: goto __pyx_L5_argtuple_error;
   20088             :       }
   20089             :     }
   20090          25 :     __pyx_v_graph = values[0];
   20091          25 :     __pyx_v_perm_type = values[1];
   20092             :   }
   20093          25 :   goto __pyx_L6_skip;
   20094           0 :   __pyx_L5_argtuple_error:;
   20095           0 :   __Pyx_RaiseArgtupleInvalid("maximum_bipartite_matching", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 18, __pyx_L3_error)
   20096          25 :   __pyx_L6_skip:;
   20097          25 :   goto __pyx_L4_argument_unpacking_done;
   20098           0 :   __pyx_L3_error:;
   20099             :   {
   20100           0 :     Py_ssize_t __pyx_temp;
   20101           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   20102             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   20103             :     }
   20104             :   }
   20105           0 :   __Pyx_AddTraceback("scipy.sparse.csgraph._matching.maximum_bipartite_matching", __pyx_clineno, __pyx_lineno, __pyx_filename);
   20106           0 :   __Pyx_RefNannyFinishContext();
   20107           0 :   return NULL;
   20108          25 :   __pyx_L4_argument_unpacking_done:;
   20109          25 :   __pyx_r = __pyx_pf_5scipy_6sparse_7csgraph_9_matching_maximum_bipartite_matching(__pyx_self, __pyx_v_graph, __pyx_v_perm_type);
   20110             : 
   20111             :   /* function exit code */
   20112             :   {
   20113          25 :     Py_ssize_t __pyx_temp;
   20114          25 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   20115             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   20116             :     }
   20117             :   }
   20118             :   __Pyx_RefNannyFinishContext();
   20119             :   return __pyx_r;
   20120             : }
   20121             : 
   20122          25 : static PyObject *__pyx_pf_5scipy_6sparse_7csgraph_9_matching_maximum_bipartite_matching(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_graph, PyObject *__pyx_v_perm_type) {
   20123          25 :   PyObject *__pyx_v_i = NULL;
   20124          25 :   PyObject *__pyx_v_j = NULL;
   20125          25 :   PyObject *__pyx_v_indices = NULL;
   20126          25 :   PyObject *__pyx_v_indptr = NULL;
   20127          25 :   PyObject *__pyx_v_x = NULL;
   20128          25 :   PyObject *__pyx_v_y = NULL;
   20129          25 :   PyObject *__pyx_r = NULL;
   20130             :   __Pyx_RefNannyDeclarations
   20131          25 :   PyObject *__pyx_t_1 = NULL;
   20132          25 :   PyObject *__pyx_t_2 = NULL;
   20133          25 :   PyObject *__pyx_t_3 = NULL;
   20134          25 :   unsigned int __pyx_t_4;
   20135          25 :   int __pyx_t_5;
   20136          25 :   int __pyx_t_6;
   20137          25 :   PyObject *__pyx_t_7 = NULL;
   20138          25 :   PyObject *(*__pyx_t_8)(PyObject *);
   20139          25 :   __Pyx_memviewslice __pyx_t_9 = { 0, 0, { 0 }, { 0 }, { 0 } };
   20140          25 :   __Pyx_memviewslice __pyx_t_10 = { 0, 0, { 0 }, { 0 }, { 0 } };
   20141          25 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_11;
   20142          25 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_12;
   20143          25 :   int __pyx_lineno = 0;
   20144          25 :   const char *__pyx_filename = NULL;
   20145          25 :   int __pyx_clineno = 0;
   20146          25 :   __Pyx_RefNannySetupContext("maximum_bipartite_matching", 0);
   20147          25 :   __Pyx_INCREF(__pyx_v_graph);
   20148             : 
   20149             :   /* "scipy/sparse/csgraph/_matching.pyx":138
   20150             :  * 
   20151             :  *     """
   20152             :  *     graph = convert_pydata_sparse_to_scipy(graph)             # <<<<<<<<<<<<<<
   20153             :  *     if not issparse(graph):
   20154             :  *         raise TypeError("graph must be sparse")
   20155             :  */
   20156          25 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_convert_pydata_sparse_to_scipy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error)
   20157          25 :   __Pyx_GOTREF(__pyx_t_2);
   20158          25 :   __pyx_t_3 = NULL;
   20159          25 :   __pyx_t_4 = 0;
   20160             :   #if CYTHON_UNPACK_METHODS
   20161          25 :   if (unlikely(PyMethod_Check(__pyx_t_2))) {
   20162           0 :     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
   20163           0 :     if (likely(__pyx_t_3)) {
   20164           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   20165           0 :       __Pyx_INCREF(__pyx_t_3);
   20166           0 :       __Pyx_INCREF(function);
   20167           0 :       __Pyx_DECREF_SET(__pyx_t_2, function);
   20168             :       __pyx_t_4 = 1;
   20169             :     }
   20170             :   }
   20171             :   #endif
   20172             :   {
   20173          25 :     PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_graph};
   20174          25 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   20175          25 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   20176          25 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error)
   20177          25 :     __Pyx_GOTREF(__pyx_t_1);
   20178          25 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20179             :   }
   20180          25 :   __Pyx_DECREF_SET(__pyx_v_graph, __pyx_t_1);
   20181          25 :   __pyx_t_1 = 0;
   20182             : 
   20183             :   /* "scipy/sparse/csgraph/_matching.pyx":139
   20184             :  *     """
   20185             :  *     graph = convert_pydata_sparse_to_scipy(graph)
   20186             :  *     if not issparse(graph):             # <<<<<<<<<<<<<<
   20187             :  *         raise TypeError("graph must be sparse")
   20188             :  *     if graph.format not in ("csr", "csc", "coo"):
   20189             :  */
   20190          25 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_issparse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error)
   20191          25 :   __Pyx_GOTREF(__pyx_t_2);
   20192          25 :   __pyx_t_3 = NULL;
   20193          25 :   __pyx_t_4 = 0;
   20194             :   #if CYTHON_UNPACK_METHODS
   20195          25 :   if (unlikely(PyMethod_Check(__pyx_t_2))) {
   20196           0 :     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
   20197           0 :     if (likely(__pyx_t_3)) {
   20198           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   20199           0 :       __Pyx_INCREF(__pyx_t_3);
   20200           0 :       __Pyx_INCREF(function);
   20201           0 :       __Pyx_DECREF_SET(__pyx_t_2, function);
   20202             :       __pyx_t_4 = 1;
   20203             :     }
   20204             :   }
   20205             :   #endif
   20206             :   {
   20207          25 :     PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_graph};
   20208          25 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   20209          25 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   20210          25 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
   20211          25 :     __Pyx_GOTREF(__pyx_t_1);
   20212          25 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20213             :   }
   20214          25 :   __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 139, __pyx_L1_error)
   20215          25 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20216          25 :   __pyx_t_6 = (!__pyx_t_5);
   20217          25 :   if (unlikely(__pyx_t_6)) {
   20218             : 
   20219             :     /* "scipy/sparse/csgraph/_matching.pyx":140
   20220             :  *     graph = convert_pydata_sparse_to_scipy(graph)
   20221             :  *     if not issparse(graph):
   20222             :  *         raise TypeError("graph must be sparse")             # <<<<<<<<<<<<<<
   20223             :  *     if graph.format not in ("csr", "csc", "coo"):
   20224             :  *         raise TypeError("graph must be in CSC, CSR, or COO format.")
   20225             :  */
   20226           1 :     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
   20227           1 :     __Pyx_GOTREF(__pyx_t_1);
   20228           1 :     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
   20229           1 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20230           1 :     __PYX_ERR(0, 140, __pyx_L1_error)
   20231             : 
   20232             :     /* "scipy/sparse/csgraph/_matching.pyx":139
   20233             :  *     """
   20234             :  *     graph = convert_pydata_sparse_to_scipy(graph)
   20235             :  *     if not issparse(graph):             # <<<<<<<<<<<<<<
   20236             :  *         raise TypeError("graph must be sparse")
   20237             :  *     if graph.format not in ("csr", "csc", "coo"):
   20238             :  */
   20239             :   }
   20240             : 
   20241             :   /* "scipy/sparse/csgraph/_matching.pyx":141
   20242             :  *     if not issparse(graph):
   20243             :  *         raise TypeError("graph must be sparse")
   20244             :  *     if graph.format not in ("csr", "csc", "coo"):             # <<<<<<<<<<<<<<
   20245             :  *         raise TypeError("graph must be in CSC, CSR, or COO format.")
   20246             :  *     graph = graph.tocsr()
   20247             :  */
   20248          24 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_graph, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
   20249          24 :   __Pyx_GOTREF(__pyx_t_1);
   20250          24 :   __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_csr, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 141, __pyx_L1_error)
   20251          24 :   if (__pyx_t_5) {
   20252           0 :   } else {
   20253          24 :     __pyx_t_6 = __pyx_t_5;
   20254          24 :     goto __pyx_L5_bool_binop_done;
   20255             :   }
   20256           0 :   __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_csc, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 141, __pyx_L1_error)
   20257           0 :   if (__pyx_t_5) {
   20258           0 :   } else {
   20259           0 :     __pyx_t_6 = __pyx_t_5;
   20260           0 :     goto __pyx_L5_bool_binop_done;
   20261             :   }
   20262           0 :   __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_coo, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 141, __pyx_L1_error)
   20263             :   __pyx_t_6 = __pyx_t_5;
   20264          24 :   __pyx_L5_bool_binop_done:;
   20265          24 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20266          24 :   __pyx_t_5 = __pyx_t_6;
   20267          24 :   if (unlikely(__pyx_t_5)) {
   20268             : 
   20269             :     /* "scipy/sparse/csgraph/_matching.pyx":142
   20270             :  *         raise TypeError("graph must be sparse")
   20271             :  *     if graph.format not in ("csr", "csc", "coo"):
   20272             :  *         raise TypeError("graph must be in CSC, CSR, or COO format.")             # <<<<<<<<<<<<<<
   20273             :  *     graph = graph.tocsr()
   20274             :  *     i, j = graph.shape
   20275             :  */
   20276           0 :     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
   20277           0 :     __Pyx_GOTREF(__pyx_t_1);
   20278           0 :     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
   20279           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20280           0 :     __PYX_ERR(0, 142, __pyx_L1_error)
   20281             : 
   20282             :     /* "scipy/sparse/csgraph/_matching.pyx":141
   20283             :  *     if not issparse(graph):
   20284             :  *         raise TypeError("graph must be sparse")
   20285             :  *     if graph.format not in ("csr", "csc", "coo"):             # <<<<<<<<<<<<<<
   20286             :  *         raise TypeError("graph must be in CSC, CSR, or COO format.")
   20287             :  *     graph = graph.tocsr()
   20288             :  */
   20289             :   }
   20290             : 
   20291             :   /* "scipy/sparse/csgraph/_matching.pyx":143
   20292             :  *     if graph.format not in ("csr", "csc", "coo"):
   20293             :  *         raise TypeError("graph must be in CSC, CSR, or COO format.")
   20294             :  *     graph = graph.tocsr()             # <<<<<<<<<<<<<<
   20295             :  *     i, j = graph.shape
   20296             :  *     indices, indptr = _safe_downcast_indices(graph)
   20297             :  */
   20298          24 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_graph, __pyx_n_s_tocsr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error)
   20299          24 :   __Pyx_GOTREF(__pyx_t_2);
   20300          24 :   __pyx_t_3 = NULL;
   20301          24 :   __pyx_t_4 = 0;
   20302             :   #if CYTHON_UNPACK_METHODS
   20303          24 :   if (likely(PyMethod_Check(__pyx_t_2))) {
   20304          24 :     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
   20305          24 :     if (likely(__pyx_t_3)) {
   20306          24 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   20307          24 :       __Pyx_INCREF(__pyx_t_3);
   20308          24 :       __Pyx_INCREF(function);
   20309          24 :       __Pyx_DECREF_SET(__pyx_t_2, function);
   20310             :       __pyx_t_4 = 1;
   20311             :     }
   20312             :   }
   20313             :   #endif
   20314             :   {
   20315          24 :     PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
   20316          24 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
   20317          24 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   20318          24 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
   20319          24 :     __Pyx_GOTREF(__pyx_t_1);
   20320          24 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20321             :   }
   20322          24 :   __Pyx_DECREF_SET(__pyx_v_graph, __pyx_t_1);
   20323          24 :   __pyx_t_1 = 0;
   20324             : 
   20325             :   /* "scipy/sparse/csgraph/_matching.pyx":144
   20326             :  *         raise TypeError("graph must be in CSC, CSR, or COO format.")
   20327             :  *     graph = graph.tocsr()
   20328             :  *     i, j = graph.shape             # <<<<<<<<<<<<<<
   20329             :  *     indices, indptr = _safe_downcast_indices(graph)
   20330             :  *     x, y = _hopcroft_karp(indices, indptr, i, j)
   20331             :  */
   20332          24 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_graph, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error)
   20333          24 :   __Pyx_GOTREF(__pyx_t_1);
   20334          24 :   if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
   20335          24 :     PyObject* sequence = __pyx_t_1;
   20336          24 :     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
   20337          24 :     if (unlikely(size != 2)) {
   20338           0 :       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
   20339           0 :       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
   20340           0 :       __PYX_ERR(0, 144, __pyx_L1_error)
   20341             :     }
   20342             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   20343          24 :     if (likely(PyTuple_CheckExact(sequence))) {
   20344          24 :       __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
   20345          24 :       __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
   20346             :     } else {
   20347           0 :       __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
   20348           0 :       __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
   20349             :     }
   20350          24 :     __Pyx_INCREF(__pyx_t_2);
   20351          24 :     __Pyx_INCREF(__pyx_t_3);
   20352             :     #else
   20353             :     __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
   20354             :     __Pyx_GOTREF(__pyx_t_2);
   20355             :     __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
   20356             :     __Pyx_GOTREF(__pyx_t_3);
   20357             :     #endif
   20358          24 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20359             :   } else {
   20360           0 :     Py_ssize_t index = -1;
   20361           0 :     __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 144, __pyx_L1_error)
   20362           0 :     __Pyx_GOTREF(__pyx_t_7);
   20363           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20364           0 :     __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
   20365           0 :     index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L8_unpacking_failed;
   20366           0 :     __Pyx_GOTREF(__pyx_t_2);
   20367           0 :     index = 1; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L8_unpacking_failed;
   20368           0 :     __Pyx_GOTREF(__pyx_t_3);
   20369           0 :     if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 144, __pyx_L1_error)
   20370           0 :     __pyx_t_8 = NULL;
   20371           0 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   20372           0 :     goto __pyx_L9_unpacking_done;
   20373           0 :     __pyx_L8_unpacking_failed:;
   20374           0 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   20375           0 :     __pyx_t_8 = NULL;
   20376           0 :     if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
   20377           0 :     __PYX_ERR(0, 144, __pyx_L1_error)
   20378           0 :     __pyx_L9_unpacking_done:;
   20379             :   }
   20380          24 :   __pyx_v_i = __pyx_t_2;
   20381          24 :   __pyx_t_2 = 0;
   20382          24 :   __pyx_v_j = __pyx_t_3;
   20383          24 :   __pyx_t_3 = 0;
   20384             : 
   20385             :   /* "scipy/sparse/csgraph/_matching.pyx":145
   20386             :  *     graph = graph.tocsr()
   20387             :  *     i, j = graph.shape
   20388             :  *     indices, indptr = _safe_downcast_indices(graph)             # <<<<<<<<<<<<<<
   20389             :  *     x, y = _hopcroft_karp(indices, indptr, i, j)
   20390             :  *     return np.asarray(x if perm_type == 'column' else y)
   20391             :  */
   20392          24 :   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_safe_downcast_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
   20393          24 :   __Pyx_GOTREF(__pyx_t_3);
   20394          24 :   __pyx_t_2 = NULL;
   20395          24 :   __pyx_t_4 = 0;
   20396             :   #if CYTHON_UNPACK_METHODS
   20397          24 :   if (unlikely(PyMethod_Check(__pyx_t_3))) {
   20398           0 :     __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
   20399           0 :     if (likely(__pyx_t_2)) {
   20400           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   20401           0 :       __Pyx_INCREF(__pyx_t_2);
   20402           0 :       __Pyx_INCREF(function);
   20403           0 :       __Pyx_DECREF_SET(__pyx_t_3, function);
   20404             :       __pyx_t_4 = 1;
   20405             :     }
   20406             :   }
   20407             :   #endif
   20408             :   {
   20409          24 :     PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_graph};
   20410          24 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   20411          24 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   20412          24 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error)
   20413          24 :     __Pyx_GOTREF(__pyx_t_1);
   20414          24 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20415             :   }
   20416          24 :   if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
   20417          24 :     PyObject* sequence = __pyx_t_1;
   20418          24 :     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
   20419          24 :     if (unlikely(size != 2)) {
   20420           0 :       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
   20421           0 :       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
   20422           0 :       __PYX_ERR(0, 145, __pyx_L1_error)
   20423             :     }
   20424             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   20425          24 :     if (likely(PyTuple_CheckExact(sequence))) {
   20426          24 :       __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
   20427          24 :       __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
   20428             :     } else {
   20429           0 :       __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
   20430           0 :       __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
   20431             :     }
   20432          24 :     __Pyx_INCREF(__pyx_t_3);
   20433          24 :     __Pyx_INCREF(__pyx_t_2);
   20434             :     #else
   20435             :     __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
   20436             :     __Pyx_GOTREF(__pyx_t_3);
   20437             :     __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error)
   20438             :     __Pyx_GOTREF(__pyx_t_2);
   20439             :     #endif
   20440          24 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20441             :   } else {
   20442           0 :     Py_ssize_t index = -1;
   20443           0 :     __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 145, __pyx_L1_error)
   20444           0 :     __Pyx_GOTREF(__pyx_t_7);
   20445           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20446           0 :     __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
   20447           0 :     index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L10_unpacking_failed;
   20448           0 :     __Pyx_GOTREF(__pyx_t_3);
   20449           0 :     index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L10_unpacking_failed;
   20450           0 :     __Pyx_GOTREF(__pyx_t_2);
   20451           0 :     if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 145, __pyx_L1_error)
   20452           0 :     __pyx_t_8 = NULL;
   20453           0 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   20454           0 :     goto __pyx_L11_unpacking_done;
   20455           0 :     __pyx_L10_unpacking_failed:;
   20456           0 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   20457           0 :     __pyx_t_8 = NULL;
   20458           0 :     if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
   20459           0 :     __PYX_ERR(0, 145, __pyx_L1_error)
   20460           0 :     __pyx_L11_unpacking_done:;
   20461             :   }
   20462          24 :   __pyx_v_indices = __pyx_t_3;
   20463          24 :   __pyx_t_3 = 0;
   20464          24 :   __pyx_v_indptr = __pyx_t_2;
   20465          24 :   __pyx_t_2 = 0;
   20466             : 
   20467             :   /* "scipy/sparse/csgraph/_matching.pyx":146
   20468             :  *     i, j = graph.shape
   20469             :  *     indices, indptr = _safe_downcast_indices(graph)
   20470             :  *     x, y = _hopcroft_karp(indices, indptr, i, j)             # <<<<<<<<<<<<<<
   20471             :  *     return np.asarray(x if perm_type == 'column' else y)
   20472             :  * 
   20473             :  */
   20474          24 :   __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t__const__(__pyx_v_indices, 0); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 146, __pyx_L1_error)
   20475          24 :   __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t__const__(__pyx_v_indptr, 0); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 146, __pyx_L1_error)
   20476          24 :   __pyx_t_11 = __Pyx_PyInt_As_npy_int32(__pyx_v_i); if (unlikely((__pyx_t_11 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 146, __pyx_L1_error)
   20477          24 :   __pyx_t_12 = __Pyx_PyInt_As_npy_int32(__pyx_v_j); if (unlikely((__pyx_t_12 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 146, __pyx_L1_error)
   20478          24 :   __pyx_t_1 = __pyx_f_5scipy_6sparse_7csgraph_9_matching__hopcroft_karp(__pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error)
   20479          24 :   __Pyx_GOTREF(__pyx_t_1);
   20480          24 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_9, 1);
   20481          24 :   __pyx_t_9.memview = NULL; __pyx_t_9.data = NULL;
   20482          24 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_10, 1);
   20483          24 :   __pyx_t_10.memview = NULL; __pyx_t_10.data = NULL;
   20484          24 :   if (likely(__pyx_t_1 != Py_None)) {
   20485          24 :     PyObject* sequence = __pyx_t_1;
   20486          24 :     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
   20487          24 :     if (unlikely(size != 2)) {
   20488           0 :       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
   20489           0 :       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
   20490           0 :       __PYX_ERR(0, 146, __pyx_L1_error)
   20491             :     }
   20492             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   20493          24 :     __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
   20494          24 :     __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
   20495          24 :     __Pyx_INCREF(__pyx_t_2);
   20496          24 :     __Pyx_INCREF(__pyx_t_3);
   20497             :     #else
   20498             :     __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error)
   20499             :     __Pyx_GOTREF(__pyx_t_2);
   20500             :     __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error)
   20501             :     __Pyx_GOTREF(__pyx_t_3);
   20502             :     #endif
   20503          24 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20504             :   } else {
   20505           0 :     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 146, __pyx_L1_error)
   20506             :   }
   20507          24 :   __pyx_v_x = __pyx_t_2;
   20508          24 :   __pyx_t_2 = 0;
   20509          24 :   __pyx_v_y = __pyx_t_3;
   20510          24 :   __pyx_t_3 = 0;
   20511             : 
   20512             :   /* "scipy/sparse/csgraph/_matching.pyx":147
   20513             :  *     indices, indptr = _safe_downcast_indices(graph)
   20514             :  *     x, y = _hopcroft_karp(indices, indptr, i, j)
   20515             :  *     return np.asarray(x if perm_type == 'column' else y)             # <<<<<<<<<<<<<<
   20516             :  * 
   20517             :  * 
   20518             :  */
   20519          24 :   __Pyx_XDECREF(__pyx_r);
   20520          24 :   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error)
   20521          24 :   __Pyx_GOTREF(__pyx_t_3);
   20522          24 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
   20523          24 :   __Pyx_GOTREF(__pyx_t_2);
   20524          24 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20525          24 :   __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_perm_type, __pyx_n_u_column, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 147, __pyx_L1_error)
   20526          24 :   if (__pyx_t_5) {
   20527          10 :     __Pyx_INCREF(__pyx_v_x);
   20528             :     __pyx_t_3 = __pyx_v_x;
   20529             :   } else {
   20530          14 :     __Pyx_INCREF(__pyx_v_y);
   20531             :     __pyx_t_3 = __pyx_v_y;
   20532             :   }
   20533          24 :   __pyx_t_7 = NULL;
   20534          24 :   __pyx_t_4 = 0;
   20535             :   #if CYTHON_UNPACK_METHODS
   20536          24 :   if (unlikely(PyMethod_Check(__pyx_t_2))) {
   20537           0 :     __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
   20538           0 :     if (likely(__pyx_t_7)) {
   20539           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   20540           0 :       __Pyx_INCREF(__pyx_t_7);
   20541           0 :       __Pyx_INCREF(function);
   20542           0 :       __Pyx_DECREF_SET(__pyx_t_2, function);
   20543             :       __pyx_t_4 = 1;
   20544             :     }
   20545             :   }
   20546             :   #endif
   20547             :   {
   20548          24 :     PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3};
   20549          24 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   20550          24 :     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   20551          24 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20552          24 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
   20553          24 :     __Pyx_GOTREF(__pyx_t_1);
   20554          24 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20555             :   }
   20556          24 :   __pyx_r = __pyx_t_1;
   20557          24 :   __pyx_t_1 = 0;
   20558          24 :   goto __pyx_L0;
   20559             : 
   20560             :   /* "scipy/sparse/csgraph/_matching.pyx":18
   20561             :  * 
   20562             :  * 
   20563             :  * def maximum_bipartite_matching(graph, perm_type='row'):             # <<<<<<<<<<<<<<
   20564             :  *     r"""
   20565             :  *     maximum_bipartite_matching(graph, perm_type='row')
   20566             :  */
   20567             : 
   20568             :   /* function exit code */
   20569           1 :   __pyx_L1_error:;
   20570           1 :   __Pyx_XDECREF(__pyx_t_1);
   20571           1 :   __Pyx_XDECREF(__pyx_t_2);
   20572           1 :   __Pyx_XDECREF(__pyx_t_3);
   20573           1 :   __Pyx_XDECREF(__pyx_t_7);
   20574           1 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_9, 1);
   20575           1 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_10, 1);
   20576           1 :   __Pyx_AddTraceback("scipy.sparse.csgraph._matching.maximum_bipartite_matching", __pyx_clineno, __pyx_lineno, __pyx_filename);
   20577           1 :   __pyx_r = NULL;
   20578          25 :   __pyx_L0:;
   20579          25 :   __Pyx_XDECREF(__pyx_v_i);
   20580          25 :   __Pyx_XDECREF(__pyx_v_j);
   20581          25 :   __Pyx_XDECREF(__pyx_v_indices);
   20582          25 :   __Pyx_XDECREF(__pyx_v_indptr);
   20583          25 :   __Pyx_XDECREF(__pyx_v_x);
   20584          25 :   __Pyx_XDECREF(__pyx_v_y);
   20585          25 :   __Pyx_XDECREF(__pyx_v_graph);
   20586          25 :   __Pyx_XGIVEREF(__pyx_r);
   20587          25 :   __Pyx_RefNannyFinishContext();
   20588          25 :   return __pyx_r;
   20589             : }
   20590             : 
   20591             : /* "scipy/sparse/csgraph/_matching.pyx":152
   20592             :  * @cython.boundscheck(False)
   20593             :  * @cython.wraparound(False)
   20594             :  * cdef tuple _hopcroft_karp(const ITYPE_t[:] indices, const ITYPE_t[:] indptr,             # <<<<<<<<<<<<<<
   20595             :  *                           const ITYPE_t i, const ITYPE_t j):
   20596             :  *     cdef ITYPE_t INF = np.iinfo(ITYPE).max
   20597             :  */
   20598             : 
   20599         135 : static PyObject *__pyx_f_5scipy_6sparse_7csgraph_9_matching__hopcroft_karp(__Pyx_memviewslice __pyx_v_indices, __Pyx_memviewslice __pyx_v_indptr, __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t const __pyx_v_i, __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t const __pyx_v_j) {
   20600         135 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_INF;
   20601         135 :   __Pyx_memviewslice __pyx_v_x = { 0, 0, { 0 }, { 0 }, { 0 } };
   20602         135 :   __Pyx_memviewslice __pyx_v_y = { 0, 0, { 0 }, { 0 }, { 0 } };
   20603         135 :   __Pyx_memviewslice __pyx_v_dist = { 0, 0, { 0 }, { 0 }, { 0 } };
   20604         135 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_k;
   20605         135 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_v;
   20606         135 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_w;
   20607         135 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_up;
   20608         135 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_u;
   20609         135 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_yu;
   20610         135 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_u_old;
   20611         135 :   __Pyx_memviewslice __pyx_v_q = { 0, 0, { 0 }, { 0 }, { 0 } };
   20612         135 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_head;
   20613         135 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_tail;
   20614         135 :   __Pyx_memviewslice __pyx_v_stack = { 0, 0, { 0 }, { 0 }, { 0 } };
   20615         135 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_stack_head;
   20616         135 :   __Pyx_memviewslice __pyx_v_parents = { 0, 0, { 0 }, { 0 }, { 0 } };
   20617         135 :   int __pyx_v_done;
   20618         135 :   CYTHON_UNUSED int __pyx_v_could_augment;
   20619         135 :   PyObject *__pyx_r = NULL;
   20620             :   __Pyx_RefNannyDeclarations
   20621         135 :   PyObject *__pyx_t_1 = NULL;
   20622         135 :   PyObject *__pyx_t_2 = NULL;
   20623         135 :   PyObject *__pyx_t_3 = NULL;
   20624         135 :   PyObject *__pyx_t_4 = NULL;
   20625         135 :   unsigned int __pyx_t_5;
   20626         135 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_6;
   20627         135 :   __Pyx_memviewslice __pyx_t_7 = { 0, 0, { 0 }, { 0 }, { 0 } };
   20628         135 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_8;
   20629         135 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_9;
   20630         135 :   Py_ssize_t __pyx_t_10;
   20631         135 :   int __pyx_t_11;
   20632         135 :   Py_ssize_t __pyx_t_12;
   20633         135 :   Py_ssize_t __pyx_t_13;
   20634         135 :   Py_ssize_t __pyx_t_14;
   20635         135 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_15;
   20636         135 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_16;
   20637         135 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_17;
   20638         135 :   int __pyx_lineno = 0;
   20639         135 :   const char *__pyx_filename = NULL;
   20640         135 :   int __pyx_clineno = 0;
   20641         135 :   __Pyx_RefNannySetupContext("_hopcroft_karp", 1);
   20642             : 
   20643             :   /* "scipy/sparse/csgraph/_matching.pyx":154
   20644             :  * cdef tuple _hopcroft_karp(const ITYPE_t[:] indices, const ITYPE_t[:] indptr,
   20645             :  *                           const ITYPE_t i, const ITYPE_t j):
   20646             :  *     cdef ITYPE_t INF = np.iinfo(ITYPE).max             # <<<<<<<<<<<<<<
   20647             :  *     # x will end up containing the matchings of rows to columns, while
   20648             :  *     # y will contain the matchings of columns to rows.
   20649             :  */
   20650         135 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
   20651         135 :   __Pyx_GOTREF(__pyx_t_2);
   20652         135 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
   20653         135 :   __Pyx_GOTREF(__pyx_t_3);
   20654         135 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20655         135 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ITYPE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
   20656         135 :   __Pyx_GOTREF(__pyx_t_2);
   20657         135 :   __pyx_t_4 = NULL;
   20658         135 :   __pyx_t_5 = 0;
   20659             :   #if CYTHON_UNPACK_METHODS
   20660         135 :   if (unlikely(PyMethod_Check(__pyx_t_3))) {
   20661           0 :     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
   20662           0 :     if (likely(__pyx_t_4)) {
   20663           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   20664           0 :       __Pyx_INCREF(__pyx_t_4);
   20665           0 :       __Pyx_INCREF(function);
   20666           0 :       __Pyx_DECREF_SET(__pyx_t_3, function);
   20667             :       __pyx_t_5 = 1;
   20668             :     }
   20669             :   }
   20670             :   #endif
   20671             :   {
   20672         135 :     PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
   20673         135 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
   20674         135 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   20675         135 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20676         135 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
   20677         135 :     __Pyx_GOTREF(__pyx_t_1);
   20678         135 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20679             :   }
   20680         135 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_max); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
   20681         135 :   __Pyx_GOTREF(__pyx_t_3);
   20682         135 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20683         135 :   __pyx_t_6 = __Pyx_PyInt_As_npy_int32(__pyx_t_3); if (unlikely((__pyx_t_6 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 154, __pyx_L1_error)
   20684         135 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20685         135 :   __pyx_v_INF = __pyx_t_6;
   20686             : 
   20687             :   /* "scipy/sparse/csgraph/_matching.pyx":157
   20688             :  *     # x will end up containing the matchings of rows to columns, while
   20689             :  *     # y will contain the matchings of columns to rows.
   20690             :  *     cdef ITYPE_t[:] x = np.empty(i, dtype=ITYPE)             # <<<<<<<<<<<<<<
   20691             :  *     cdef ITYPE_t[:] y = np.empty(j, dtype=ITYPE)
   20692             :  * 
   20693             :  */
   20694         135 :   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error)
   20695         135 :   __Pyx_GOTREF(__pyx_t_3);
   20696         135 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
   20697         135 :   __Pyx_GOTREF(__pyx_t_1);
   20698         135 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20699         135 :   __pyx_t_3 = __Pyx_PyInt_From_npy_int32(__pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error)
   20700         135 :   __Pyx_GOTREF(__pyx_t_3);
   20701         135 :   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error)
   20702         135 :   __Pyx_GOTREF(__pyx_t_2);
   20703         135 :   __Pyx_GIVEREF(__pyx_t_3);
   20704         135 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error);
   20705         135 :   __pyx_t_3 = 0;
   20706         135 :   __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error)
   20707         135 :   __Pyx_GOTREF(__pyx_t_3);
   20708         135 :   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ITYPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
   20709         135 :   __Pyx_GOTREF(__pyx_t_4);
   20710         135 :   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
   20711         135 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   20712         135 :   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
   20713         135 :   __Pyx_GOTREF(__pyx_t_4);
   20714         135 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20715         135 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20716         135 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20717         135 :   __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 157, __pyx_L1_error)
   20718         135 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   20719         135 :   __pyx_v_x = __pyx_t_7;
   20720         135 :   __pyx_t_7.memview = NULL;
   20721         135 :   __pyx_t_7.data = NULL;
   20722             : 
   20723             :   /* "scipy/sparse/csgraph/_matching.pyx":158
   20724             :  *     # y will contain the matchings of columns to rows.
   20725             :  *     cdef ITYPE_t[:] x = np.empty(i, dtype=ITYPE)
   20726             :  *     cdef ITYPE_t[:] y = np.empty(j, dtype=ITYPE)             # <<<<<<<<<<<<<<
   20727             :  * 
   20728             :  *     # During the BFS step, dist will keep track of the level of the search. We
   20729             :  */
   20730         135 :   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error)
   20731         135 :   __Pyx_GOTREF(__pyx_t_4);
   20732         135 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error)
   20733         135 :   __Pyx_GOTREF(__pyx_t_3);
   20734         135 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   20735         135 :   __pyx_t_4 = __Pyx_PyInt_From_npy_int32(__pyx_v_j); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error)
   20736         135 :   __Pyx_GOTREF(__pyx_t_4);
   20737         135 :   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
   20738         135 :   __Pyx_GOTREF(__pyx_t_2);
   20739         135 :   __Pyx_GIVEREF(__pyx_t_4);
   20740         135 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error);
   20741         135 :   __pyx_t_4 = 0;
   20742         135 :   __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error)
   20743         135 :   __Pyx_GOTREF(__pyx_t_4);
   20744         135 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ITYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error)
   20745         135 :   __Pyx_GOTREF(__pyx_t_1);
   20746         135 :   if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
   20747         135 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20748         135 :   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error)
   20749         135 :   __Pyx_GOTREF(__pyx_t_1);
   20750         135 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20751         135 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20752         135 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   20753         135 :   __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 158, __pyx_L1_error)
   20754         135 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20755         135 :   __pyx_v_y = __pyx_t_7;
   20756         135 :   __pyx_t_7.memview = NULL;
   20757         135 :   __pyx_t_7.data = NULL;
   20758             : 
   20759             :   /* "scipy/sparse/csgraph/_matching.pyx":166
   20760             :  *     # auxiliary vertex whose index will be i, and whose semantics are that
   20761             :  *     # every unmatched column will be matched with this vertex.
   20762             :  *     cdef ITYPE_t[:] dist = np.empty(i + 1, dtype=ITYPE)             # <<<<<<<<<<<<<<
   20763             :  * 
   20764             :  *     cdef ITYPE_t k, v, w, up, u, yu, u_old
   20765             :  */
   20766         135 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
   20767         135 :   __Pyx_GOTREF(__pyx_t_1);
   20768         135 :   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error)
   20769         135 :   __Pyx_GOTREF(__pyx_t_4);
   20770         135 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20771         135 :   __pyx_t_1 = __Pyx_PyInt_From_long((__pyx_v_i + 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
   20772         135 :   __Pyx_GOTREF(__pyx_t_1);
   20773         135 :   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error)
   20774         135 :   __Pyx_GOTREF(__pyx_t_2);
   20775         135 :   __Pyx_GIVEREF(__pyx_t_1);
   20776         135 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error);
   20777         135 :   __pyx_t_1 = 0;
   20778         135 :   __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
   20779         135 :   __Pyx_GOTREF(__pyx_t_1);
   20780         135 :   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ITYPE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error)
   20781         135 :   __Pyx_GOTREF(__pyx_t_3);
   20782         135 :   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 166, __pyx_L1_error)
   20783         135 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20784         135 :   __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error)
   20785         135 :   __Pyx_GOTREF(__pyx_t_3);
   20786         135 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   20787         135 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20788         135 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20789         135 :   __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 166, __pyx_L1_error)
   20790         135 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20791         135 :   __pyx_v_dist = __pyx_t_7;
   20792         135 :   __pyx_t_7.memview = NULL;
   20793         135 :   __pyx_t_7.data = NULL;
   20794             : 
   20795             :   /* "scipy/sparse/csgraph/_matching.pyx":174
   20796             :  *     # matched to the auxiliary vertex i, and we will set their value to -1
   20797             :  *     # only when we have found a maximum matching.
   20798             :  *     for k in range(i):             # <<<<<<<<<<<<<<
   20799             :  *         x[k] = -1
   20800             :  * 
   20801             :  */
   20802         135 :   __pyx_t_6 = __pyx_v_i;
   20803         135 :   __pyx_t_8 = __pyx_t_6;
   20804       10305 :   for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
   20805       10170 :     __pyx_v_k = __pyx_t_9;
   20806             : 
   20807             :     /* "scipy/sparse/csgraph/_matching.pyx":175
   20808             :  *     # only when we have found a maximum matching.
   20809             :  *     for k in range(i):
   20810             :  *         x[k] = -1             # <<<<<<<<<<<<<<
   20811             :  * 
   20812             :  *     for k in range(j):
   20813             :  */
   20814       10170 :     __pyx_t_10 = __pyx_v_k;
   20815       10170 :     *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_10 * __pyx_v_x.strides[0]) )) = -1;
   20816             :   }
   20817             : 
   20818             :   /* "scipy/sparse/csgraph/_matching.pyx":177
   20819             :  *         x[k] = -1
   20820             :  * 
   20821             :  *     for k in range(j):             # <<<<<<<<<<<<<<
   20822             :  *         y[k] = i
   20823             :  * 
   20824             :  */
   20825       10330 :   __pyx_t_6 = __pyx_v_j;
   20826       10330 :   __pyx_t_8 = __pyx_t_6;
   20827       10330 :   for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
   20828       10195 :     __pyx_v_k = __pyx_t_9;
   20829             : 
   20830             :     /* "scipy/sparse/csgraph/_matching.pyx":178
   20831             :  * 
   20832             :  *     for k in range(j):
   20833             :  *         y[k] = i             # <<<<<<<<<<<<<<
   20834             :  * 
   20835             :  *     # Set up three structures for use in our searches: q will represent a queue
   20836             :  */
   20837       10195 :     __pyx_t_10 = __pyx_v_k;
   20838       10195 :     *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_10 * __pyx_v_y.strides[0]) )) = __pyx_v_i;
   20839             :   }
   20840             : 
   20841             :   /* "scipy/sparse/csgraph/_matching.pyx":187
   20842             :  *     # tail to keep track of the ends of the queue: Elements are dequeued from
   20843             :  *     # head and queued at tail.
   20844             :  *     cdef ITYPE_t[:] q = np.empty(i + 1, dtype=ITYPE)             # <<<<<<<<<<<<<<
   20845             :  *     cdef ITYPE_t head, tail
   20846             :  * 
   20847             :  */
   20848         135 :   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error)
   20849         135 :   __Pyx_GOTREF(__pyx_t_3);
   20850         135 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error)
   20851         135 :   __Pyx_GOTREF(__pyx_t_1);
   20852         135 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20853         135 :   __pyx_t_3 = __Pyx_PyInt_From_long((__pyx_v_i + 1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error)
   20854         135 :   __Pyx_GOTREF(__pyx_t_3);
   20855         135 :   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error)
   20856         135 :   __Pyx_GOTREF(__pyx_t_2);
   20857         135 :   __Pyx_GIVEREF(__pyx_t_3);
   20858         135 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error);
   20859         135 :   __pyx_t_3 = 0;
   20860         135 :   __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error)
   20861         135 :   __Pyx_GOTREF(__pyx_t_3);
   20862         135 :   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ITYPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L1_error)
   20863         135 :   __Pyx_GOTREF(__pyx_t_4);
   20864         135 :   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 187, __pyx_L1_error)
   20865         135 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   20866         135 :   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L1_error)
   20867         135 :   __Pyx_GOTREF(__pyx_t_4);
   20868         135 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20869         135 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20870         135 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20871         135 :   __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 187, __pyx_L1_error)
   20872         135 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   20873         135 :   __pyx_v_q = __pyx_t_7;
   20874         135 :   __pyx_t_7.memview = NULL;
   20875         135 :   __pyx_t_7.data = NULL;
   20876             : 
   20877             :   /* "scipy/sparse/csgraph/_matching.pyx":195
   20878             :  *     # (as represented by i), the stack capacity can be limited to i + 1.
   20879             :  *     # Elements will be pushed to stack_head and popped from stack_head - 1.
   20880             :  *     cdef ITYPE_t[:] stack = np.empty(i + 1, dtype=ITYPE)             # <<<<<<<<<<<<<<
   20881             :  *     cdef ITYPE_t stack_head
   20882             :  * 
   20883             :  */
   20884         135 :   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error)
   20885         135 :   __Pyx_GOTREF(__pyx_t_4);
   20886         135 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error)
   20887         135 :   __Pyx_GOTREF(__pyx_t_3);
   20888         135 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   20889         135 :   __pyx_t_4 = __Pyx_PyInt_From_long((__pyx_v_i + 1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error)
   20890         135 :   __Pyx_GOTREF(__pyx_t_4);
   20891         135 :   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error)
   20892         135 :   __Pyx_GOTREF(__pyx_t_2);
   20893         135 :   __Pyx_GIVEREF(__pyx_t_4);
   20894         135 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error);
   20895         135 :   __pyx_t_4 = 0;
   20896         135 :   __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error)
   20897         135 :   __Pyx_GOTREF(__pyx_t_4);
   20898         135 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ITYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
   20899         135 :   __Pyx_GOTREF(__pyx_t_1);
   20900         135 :   if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 195, __pyx_L1_error)
   20901         135 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20902         135 :   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
   20903         135 :   __Pyx_GOTREF(__pyx_t_1);
   20904         135 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20905         135 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20906         135 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   20907         135 :   __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 195, __pyx_L1_error)
   20908         135 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20909         135 :   __pyx_v_stack = __pyx_t_7;
   20910         135 :   __pyx_t_7.memview = NULL;
   20911         135 :   __pyx_t_7.data = NULL;
   20912             : 
   20913             :   /* "scipy/sparse/csgraph/_matching.pyx":201
   20914             :  *     # which we move. This will simplify the updates to the matching that occur
   20915             :  *     # when an augmenting path is found.
   20916             :  *     cdef ITYPE_t[:] parents = np.empty(i, dtype=ITYPE)             # <<<<<<<<<<<<<<
   20917             :  * 
   20918             :  *     # The breadth-first search part of the algorithm. This will terminate when
   20919             :  */
   20920         135 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
   20921         135 :   __Pyx_GOTREF(__pyx_t_1);
   20922         135 :   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error)
   20923         135 :   __Pyx_GOTREF(__pyx_t_4);
   20924         135 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20925         135 :   __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
   20926         135 :   __Pyx_GOTREF(__pyx_t_1);
   20927         135 :   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
   20928         135 :   __Pyx_GOTREF(__pyx_t_2);
   20929         135 :   __Pyx_GIVEREF(__pyx_t_1);
   20930         135 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error);
   20931         135 :   __pyx_t_1 = 0;
   20932         135 :   __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
   20933         135 :   __Pyx_GOTREF(__pyx_t_1);
   20934         135 :   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ITYPE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error)
   20935         135 :   __Pyx_GOTREF(__pyx_t_3);
   20936         135 :   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 201, __pyx_L1_error)
   20937         135 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20938         135 :   __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error)
   20939         135 :   __Pyx_GOTREF(__pyx_t_3);
   20940         135 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   20941         135 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20942         135 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20943         135 :   __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 201, __pyx_L1_error)
   20944         135 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20945         135 :   __pyx_v_parents = __pyx_t_7;
   20946         135 :   __pyx_t_7.memview = NULL;
   20947         135 :   __pyx_t_7.data = NULL;
   20948             : 
   20949             :   /* "scipy/sparse/csgraph/_matching.pyx":206
   20950             :  *     # we are unable to find a path to an unassigned vertex, which boils down to
   20951             :  *     # not being able to find a path to the auxiliary vertex i.
   20952             :  *     while True:             # <<<<<<<<<<<<<<
   20953             :  *         # Empty the queue by resetting the two pointers.
   20954             :  *         head = 0
   20955             :  */
   20956         537 :   while (1) {
   20957             : 
   20958             :     /* "scipy/sparse/csgraph/_matching.pyx":208
   20959             :  *     while True:
   20960             :  *         # Empty the queue by resetting the two pointers.
   20961             :  *         head = 0             # <<<<<<<<<<<<<<
   20962             :  *         tail = 0
   20963             :  *         for v in range(i):
   20964             :  */
   20965         537 :     __pyx_v_head = 0;
   20966             : 
   20967             :     /* "scipy/sparse/csgraph/_matching.pyx":209
   20968             :  *         # Empty the queue by resetting the two pointers.
   20969             :  *         head = 0
   20970             :  *         tail = 0             # <<<<<<<<<<<<<<
   20971             :  *         for v in range(i):
   20972             :  *             if x[v] < 0:
   20973             :  */
   20974         537 :     __pyx_v_tail = 0;
   20975             : 
   20976             :     /* "scipy/sparse/csgraph/_matching.pyx":210
   20977             :  *         head = 0
   20978             :  *         tail = 0
   20979             :  *         for v in range(i):             # <<<<<<<<<<<<<<
   20980             :  *             if x[v] < 0:
   20981             :  *                 dist[v] = 0
   20982             :  */
   20983         537 :     __pyx_t_6 = __pyx_v_i;
   20984         537 :     __pyx_t_8 = __pyx_t_6;
   20985       48216 :     for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
   20986       47679 :       __pyx_v_v = __pyx_t_9;
   20987             : 
   20988             :       /* "scipy/sparse/csgraph/_matching.pyx":211
   20989             :  *         tail = 0
   20990             :  *         for v in range(i):
   20991             :  *             if x[v] < 0:             # <<<<<<<<<<<<<<
   20992             :  *                 dist[v] = 0
   20993             :  *                 # Enqueue v. Note that in an ordinary circular buffer, we would
   20994             :  */
   20995       47679 :       __pyx_t_10 = __pyx_v_v;
   20996       47679 :       __pyx_t_11 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_10 * __pyx_v_x.strides[0]) ))) < 0);
   20997       47679 :       if (__pyx_t_11) {
   20998             : 
   20999             :         /* "scipy/sparse/csgraph/_matching.pyx":212
   21000             :  *         for v in range(i):
   21001             :  *             if x[v] < 0:
   21002             :  *                 dist[v] = 0             # <<<<<<<<<<<<<<
   21003             :  *                 # Enqueue v. Note that in an ordinary circular buffer, we would
   21004             :  *                 # avoid overflows by wrapping around indices, but since we will
   21005             :  */
   21006       11834 :         __pyx_t_10 = __pyx_v_v;
   21007       11834 :         *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_dist.data + __pyx_t_10 * __pyx_v_dist.strides[0]) )) = 0;
   21008             : 
   21009             :         /* "scipy/sparse/csgraph/_matching.pyx":217
   21010             :  *                 # never enqueue more than i + 1 different elements at a single
   21011             :  *                 # iteration, we can avoid doing so.
   21012             :  *                 q[tail] = v             # <<<<<<<<<<<<<<
   21013             :  *                 tail += 1
   21014             :  *             else:
   21015             :  */
   21016       11834 :         __pyx_t_10 = __pyx_v_tail;
   21017       11834 :         *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_q.data + __pyx_t_10 * __pyx_v_q.strides[0]) )) = __pyx_v_v;
   21018             : 
   21019             :         /* "scipy/sparse/csgraph/_matching.pyx":218
   21020             :  *                 # iteration, we can avoid doing so.
   21021             :  *                 q[tail] = v
   21022             :  *                 tail += 1             # <<<<<<<<<<<<<<
   21023             :  *             else:
   21024             :  *                 dist[v] = INF
   21025             :  */
   21026       11834 :         __pyx_v_tail = (__pyx_v_tail + 1);
   21027             : 
   21028             :         /* "scipy/sparse/csgraph/_matching.pyx":211
   21029             :  *         tail = 0
   21030             :  *         for v in range(i):
   21031             :  *             if x[v] < 0:             # <<<<<<<<<<<<<<
   21032             :  *                 dist[v] = 0
   21033             :  *                 # Enqueue v. Note that in an ordinary circular buffer, we would
   21034             :  */
   21035       11834 :         goto __pyx_L11;
   21036             :       }
   21037             : 
   21038             :       /* "scipy/sparse/csgraph/_matching.pyx":220
   21039             :  *                 tail += 1
   21040             :  *             else:
   21041             :  *                 dist[v] = INF             # <<<<<<<<<<<<<<
   21042             :  *         dist[i] = INF
   21043             :  *         # Check if the queue is empty. Note than in an ordinary circular buffer
   21044             :  */
   21045             :       /*else*/ {
   21046       35845 :         __pyx_t_10 = __pyx_v_v;
   21047       35845 :         *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_dist.data + __pyx_t_10 * __pyx_v_dist.strides[0]) )) = __pyx_v_INF;
   21048             :       }
   21049       47679 :       __pyx_L11:;
   21050             :     }
   21051             : 
   21052             :     /* "scipy/sparse/csgraph/_matching.pyx":221
   21053             :  *             else:
   21054             :  *                 dist[v] = INF
   21055             :  *         dist[i] = INF             # <<<<<<<<<<<<<<
   21056             :  *         # Check if the queue is empty. Note than in an ordinary circular buffer
   21057             :  *         # some care needs to be taken with this check when the buffer is full,
   21058             :  */
   21059         537 :     __pyx_t_10 = __pyx_v_i;
   21060         537 :     *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_dist.data + __pyx_t_10 * __pyx_v_dist.strides[0]) )) = __pyx_v_INF;
   21061             : 
   21062             :     /* "scipy/sparse/csgraph/_matching.pyx":225
   21063             :  *         # some care needs to be taken with this check when the buffer is full,
   21064             :  *         # which we can avoid as above.
   21065             :  *         while head < tail:             # <<<<<<<<<<<<<<
   21066             :  *             v = q[head]
   21067             :  *             head += 1
   21068             :  */
   21069       38007 :     while (1) {
   21070       38007 :       __pyx_t_11 = (__pyx_v_head < __pyx_v_tail);
   21071       38007 :       if (!__pyx_t_11) break;
   21072             : 
   21073             :       /* "scipy/sparse/csgraph/_matching.pyx":226
   21074             :  *         # which we can avoid as above.
   21075             :  *         while head < tail:
   21076             :  *             v = q[head]             # <<<<<<<<<<<<<<
   21077             :  *             head += 1
   21078             :  *             if dist[v] < dist[i]:
   21079             :  */
   21080       37470 :       __pyx_t_10 = __pyx_v_head;
   21081       37470 :       __pyx_v_v = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_q.data + __pyx_t_10 * __pyx_v_q.strides[0]) )));
   21082             : 
   21083             :       /* "scipy/sparse/csgraph/_matching.pyx":227
   21084             :  *         while head < tail:
   21085             :  *             v = q[head]
   21086             :  *             head += 1             # <<<<<<<<<<<<<<
   21087             :  *             if dist[v] < dist[i]:
   21088             :  *                 for up in range(indptr[v], indptr[v+1]):
   21089             :  */
   21090       37470 :       __pyx_v_head = (__pyx_v_head + 1);
   21091             : 
   21092             :       /* "scipy/sparse/csgraph/_matching.pyx":228
   21093             :  *             v = q[head]
   21094             :  *             head += 1
   21095             :  *             if dist[v] < dist[i]:             # <<<<<<<<<<<<<<
   21096             :  *                 for up in range(indptr[v], indptr[v+1]):
   21097             :  *                     u = indices[up]
   21098             :  */
   21099       37470 :       __pyx_t_10 = __pyx_v_v;
   21100       37470 :       __pyx_t_12 = __pyx_v_i;
   21101       37470 :       __pyx_t_11 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_dist.data + __pyx_t_10 * __pyx_v_dist.strides[0]) ))) < (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_dist.data + __pyx_t_12 * __pyx_v_dist.strides[0]) ))));
   21102       37470 :       if (__pyx_t_11) {
   21103             : 
   21104             :         /* "scipy/sparse/csgraph/_matching.pyx":229
   21105             :  *             head += 1
   21106             :  *             if dist[v] < dist[i]:
   21107             :  *                 for up in range(indptr[v], indptr[v+1]):             # <<<<<<<<<<<<<<
   21108             :  *                     u = indices[up]
   21109             :  *                     if dist[y[u]] == INF:
   21110             :  */
   21111       27698 :         __pyx_t_12 = (__pyx_v_v + 1);
   21112       27698 :         __pyx_t_6 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t const  *) ( /* dim=0 */ (__pyx_v_indptr.data + __pyx_t_12 * __pyx_v_indptr.strides[0]) )));
   21113       27698 :         __pyx_t_12 = __pyx_v_v;
   21114       27698 :         __pyx_t_8 = __pyx_t_6;
   21115      189908 :         for (__pyx_t_9 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t const  *) ( /* dim=0 */ (__pyx_v_indptr.data + __pyx_t_12 * __pyx_v_indptr.strides[0]) ))); __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
   21116      162210 :           __pyx_v_up = __pyx_t_9;
   21117             : 
   21118             :           /* "scipy/sparse/csgraph/_matching.pyx":230
   21119             :  *             if dist[v] < dist[i]:
   21120             :  *                 for up in range(indptr[v], indptr[v+1]):
   21121             :  *                     u = indices[up]             # <<<<<<<<<<<<<<
   21122             :  *                     if dist[y[u]] == INF:
   21123             :  *                         dist[y[u]] = dist[v] + 1
   21124             :  */
   21125      162210 :           __pyx_t_10 = __pyx_v_up;
   21126      162210 :           __pyx_v_u = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t const  *) ( /* dim=0 */ (__pyx_v_indices.data + __pyx_t_10 * __pyx_v_indices.strides[0]) )));
   21127             : 
   21128             :           /* "scipy/sparse/csgraph/_matching.pyx":231
   21129             :  *                 for up in range(indptr[v], indptr[v+1]):
   21130             :  *                     u = indices[up]
   21131             :  *                     if dist[y[u]] == INF:             # <<<<<<<<<<<<<<
   21132             :  *                         dist[y[u]] = dist[v] + 1
   21133             :  *                         q[tail] = y[u]
   21134             :  */
   21135      162210 :           __pyx_t_10 = __pyx_v_u;
   21136      162210 :           __pyx_t_13 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_10 * __pyx_v_y.strides[0]) )));
   21137      162210 :           __pyx_t_11 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_dist.data + __pyx_t_13 * __pyx_v_dist.strides[0]) ))) == __pyx_v_INF);
   21138      162210 :           if (__pyx_t_11) {
   21139             : 
   21140             :             /* "scipy/sparse/csgraph/_matching.pyx":232
   21141             :  *                     u = indices[up]
   21142             :  *                     if dist[y[u]] == INF:
   21143             :  *                         dist[y[u]] = dist[v] + 1             # <<<<<<<<<<<<<<
   21144             :  *                         q[tail] = y[u]
   21145             :  *                         tail += 1
   21146             :  */
   21147       25636 :             __pyx_t_10 = __pyx_v_v;
   21148       25636 :             __pyx_t_13 = __pyx_v_u;
   21149       25636 :             __pyx_t_14 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_13 * __pyx_v_y.strides[0]) )));
   21150       25636 :             *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_dist.data + __pyx_t_14 * __pyx_v_dist.strides[0]) )) = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_dist.data + __pyx_t_10 * __pyx_v_dist.strides[0]) ))) + 1);
   21151             : 
   21152             :             /* "scipy/sparse/csgraph/_matching.pyx":233
   21153             :  *                     if dist[y[u]] == INF:
   21154             :  *                         dist[y[u]] = dist[v] + 1
   21155             :  *                         q[tail] = y[u]             # <<<<<<<<<<<<<<
   21156             :  *                         tail += 1
   21157             :  *         # Vertices not encountered during the BFS will have a dist of INF. In
   21158             :  */
   21159       25636 :             __pyx_t_10 = __pyx_v_u;
   21160       25636 :             __pyx_t_13 = __pyx_v_tail;
   21161       25636 :             *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_q.data + __pyx_t_13 * __pyx_v_q.strides[0]) )) = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_10 * __pyx_v_y.strides[0]) )));
   21162             : 
   21163             :             /* "scipy/sparse/csgraph/_matching.pyx":234
   21164             :  *                         dist[y[u]] = dist[v] + 1
   21165             :  *                         q[tail] = y[u]
   21166             :  *                         tail += 1             # <<<<<<<<<<<<<<
   21167             :  *         # Vertices not encountered during the BFS will have a dist of INF. In
   21168             :  *         # particular, dist[i] will be INF exactly when we did not encounter any
   21169             :  */
   21170       25636 :             __pyx_v_tail = (__pyx_v_tail + 1);
   21171             : 
   21172             :             /* "scipy/sparse/csgraph/_matching.pyx":231
   21173             :  *                 for up in range(indptr[v], indptr[v+1]):
   21174             :  *                     u = indices[up]
   21175             :  *                     if dist[y[u]] == INF:             # <<<<<<<<<<<<<<
   21176             :  *                         dist[y[u]] = dist[v] + 1
   21177             :  *                         q[tail] = y[u]
   21178             :  */
   21179             :           }
   21180             :         }
   21181             : 
   21182             :         /* "scipy/sparse/csgraph/_matching.pyx":228
   21183             :  *             v = q[head]
   21184             :  *             head += 1
   21185             :  *             if dist[v] < dist[i]:             # <<<<<<<<<<<<<<
   21186             :  *                 for up in range(indptr[v], indptr[v+1]):
   21187             :  *                     u = indices[up]
   21188             :  */
   21189             :       }
   21190             :     }
   21191             : 
   21192             :     /* "scipy/sparse/csgraph/_matching.pyx":238
   21193             :  *         # particular, dist[i] will be INF exactly when we did not encounter any
   21194             :  *         # unmatched vertices.
   21195             :  *         if dist[i] == INF:             # <<<<<<<<<<<<<<
   21196             :  *             break
   21197             :  * 
   21198             :  */
   21199         537 :     __pyx_t_12 = __pyx_v_i;
   21200         537 :     __pyx_t_11 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_dist.data + __pyx_t_12 * __pyx_v_dist.strides[0]) ))) == __pyx_v_INF);
   21201         537 :     if (__pyx_t_11) {
   21202             : 
   21203             :       /* "scipy/sparse/csgraph/_matching.pyx":239
   21204             :  *         # unmatched vertices.
   21205             :  *         if dist[i] == INF:
   21206             :  *             break             # <<<<<<<<<<<<<<
   21207             :  * 
   21208             :  *         # Depth-first search starting from every unmatched vertex.
   21209             :  */
   21210         135 :       goto __pyx_L8_break;
   21211             : 
   21212             :       /* "scipy/sparse/csgraph/_matching.pyx":238
   21213             :  *         # particular, dist[i] will be INF exactly when we did not encounter any
   21214             :  *         # unmatched vertices.
   21215             :  *         if dist[i] == INF:             # <<<<<<<<<<<<<<
   21216             :  *             break
   21217             :  * 
   21218             :  */
   21219             :     }
   21220             : 
   21221             :     /* "scipy/sparse/csgraph/_matching.pyx":242
   21222             :  * 
   21223             :  *         # Depth-first search starting from every unmatched vertex.
   21224             :  *         for w in range(i):             # <<<<<<<<<<<<<<
   21225             :  *             if x[w] < 0:
   21226             :  *                 done = False
   21227             :  */
   21228       37911 :     __pyx_t_6 = __pyx_v_i;
   21229       37911 :     __pyx_t_8 = __pyx_t_6;
   21230       37911 :     for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
   21231       37509 :       __pyx_v_w = __pyx_t_9;
   21232             : 
   21233             :       /* "scipy/sparse/csgraph/_matching.pyx":243
   21234             :  *         # Depth-first search starting from every unmatched vertex.
   21235             :  *         for w in range(i):
   21236             :  *             if x[w] < 0:             # <<<<<<<<<<<<<<
   21237             :  *                 done = False
   21238             :  *                 # Initialize stack to contain only w and reset path.
   21239             :  */
   21240       37509 :       __pyx_t_12 = __pyx_v_w;
   21241       37509 :       __pyx_t_11 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_12 * __pyx_v_x.strides[0]) ))) < 0);
   21242       37509 :       if (__pyx_t_11) {
   21243             : 
   21244             :         /* "scipy/sparse/csgraph/_matching.pyx":244
   21245             :  *         for w in range(i):
   21246             :  *             if x[w] < 0:
   21247             :  *                 done = False             # <<<<<<<<<<<<<<
   21248             :  *                 # Initialize stack to contain only w and reset path.
   21249             :  *                 stack[0] = w
   21250             :  */
   21251       11763 :         __pyx_v_done = 0;
   21252             : 
   21253             :         /* "scipy/sparse/csgraph/_matching.pyx":246
   21254             :  *                 done = False
   21255             :  *                 # Initialize stack to contain only w and reset path.
   21256             :  *                 stack[0] = w             # <<<<<<<<<<<<<<
   21257             :  *                 stack_head = 1
   21258             :  *                 while stack_head != 0:
   21259             :  */
   21260       11763 :         __pyx_t_12 = 0;
   21261       11763 :         *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_stack.data + __pyx_t_12 * __pyx_v_stack.strides[0]) )) = __pyx_v_w;
   21262             : 
   21263             :         /* "scipy/sparse/csgraph/_matching.pyx":247
   21264             :  *                 # Initialize stack to contain only w and reset path.
   21265             :  *                 stack[0] = w
   21266             :  *                 stack_head = 1             # <<<<<<<<<<<<<<
   21267             :  *                 while stack_head != 0:
   21268             :  *                     # Pop v from stack.
   21269             :  */
   21270       11763 :         __pyx_v_stack_head = 1;
   21271             : 
   21272             :         /* "scipy/sparse/csgraph/_matching.pyx":248
   21273             :  *                 stack[0] = w
   21274             :  *                 stack_head = 1
   21275             :  *                 while stack_head != 0:             # <<<<<<<<<<<<<<
   21276             :  *                     # Pop v from stack.
   21277             :  *                     stack_head -= 1
   21278             :  */
   21279       36542 :         while (1) {
   21280       36542 :           __pyx_t_11 = (__pyx_v_stack_head != 0);
   21281       36542 :           if (!__pyx_t_11) break;
   21282             : 
   21283             :           /* "scipy/sparse/csgraph/_matching.pyx":250
   21284             :  *                 while stack_head != 0:
   21285             :  *                     # Pop v from stack.
   21286             :  *                     stack_head -= 1             # <<<<<<<<<<<<<<
   21287             :  *                     v = stack[stack_head]
   21288             :  *                     could_augment = False
   21289             :  */
   21290       34878 :           __pyx_v_stack_head = (__pyx_v_stack_head - 1);
   21291             : 
   21292             :           /* "scipy/sparse/csgraph/_matching.pyx":251
   21293             :  *                     # Pop v from stack.
   21294             :  *                     stack_head -= 1
   21295             :  *                     v = stack[stack_head]             # <<<<<<<<<<<<<<
   21296             :  *                     could_augment = False
   21297             :  *                     for up in range(indptr[v], indptr[v + 1]):
   21298             :  */
   21299       34878 :           __pyx_t_12 = __pyx_v_stack_head;
   21300       34878 :           __pyx_v_v = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_stack.data + __pyx_t_12 * __pyx_v_stack.strides[0]) )));
   21301             : 
   21302             :           /* "scipy/sparse/csgraph/_matching.pyx":252
   21303             :  *                     stack_head -= 1
   21304             :  *                     v = stack[stack_head]
   21305             :  *                     could_augment = False             # <<<<<<<<<<<<<<
   21306             :  *                     for up in range(indptr[v], indptr[v + 1]):
   21307             :  *                         u = indices[up]
   21308             :  */
   21309       34878 :           __pyx_v_could_augment = 0;
   21310             : 
   21311             :           /* "scipy/sparse/csgraph/_matching.pyx":253
   21312             :  *                     v = stack[stack_head]
   21313             :  *                     could_augment = False
   21314             :  *                     for up in range(indptr[v], indptr[v + 1]):             # <<<<<<<<<<<<<<
   21315             :  *                         u = indices[up]
   21316             :  *                         yu = y[u]
   21317             :  */
   21318       34878 :           __pyx_t_12 = (__pyx_v_v + 1);
   21319       34878 :           __pyx_t_15 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t const  *) ( /* dim=0 */ (__pyx_v_indptr.data + __pyx_t_12 * __pyx_v_indptr.strides[0]) )));
   21320       34878 :           __pyx_t_12 = __pyx_v_v;
   21321       34878 :           __pyx_t_16 = __pyx_t_15;
   21322      201414 :           for (__pyx_t_17 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t const  *) ( /* dim=0 */ (__pyx_v_indptr.data + __pyx_t_12 * __pyx_v_indptr.strides[0]) ))); __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) {
   21323      176635 :             __pyx_v_up = __pyx_t_17;
   21324             : 
   21325             :             /* "scipy/sparse/csgraph/_matching.pyx":254
   21326             :  *                     could_augment = False
   21327             :  *                     for up in range(indptr[v], indptr[v + 1]):
   21328             :  *                         u = indices[up]             # <<<<<<<<<<<<<<
   21329             :  *                         yu = y[u]
   21330             :  *                         if dist[yu] == dist[v] + 1:
   21331             :  */
   21332      176635 :             __pyx_t_10 = __pyx_v_up;
   21333      176635 :             __pyx_v_u = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t const  *) ( /* dim=0 */ (__pyx_v_indices.data + __pyx_t_10 * __pyx_v_indices.strides[0]) )));
   21334             : 
   21335             :             /* "scipy/sparse/csgraph/_matching.pyx":255
   21336             :  *                     for up in range(indptr[v], indptr[v + 1]):
   21337             :  *                         u = indices[up]
   21338             :  *                         yu = y[u]             # <<<<<<<<<<<<<<
   21339             :  *                         if dist[yu] == dist[v] + 1:
   21340             :  *                             could_augment = True
   21341             :  */
   21342      176635 :             __pyx_t_10 = __pyx_v_u;
   21343      176635 :             __pyx_v_yu = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_10 * __pyx_v_y.strides[0]) )));
   21344             : 
   21345             :             /* "scipy/sparse/csgraph/_matching.pyx":256
   21346             :  *                         u = indices[up]
   21347             :  *                         yu = y[u]
   21348             :  *                         if dist[yu] == dist[v] + 1:             # <<<<<<<<<<<<<<
   21349             :  *                             could_augment = True
   21350             :  *                             # If yu is unmatched, we have found an augmenting
   21351             :  */
   21352      176635 :             __pyx_t_10 = __pyx_v_yu;
   21353      176635 :             __pyx_t_13 = __pyx_v_v;
   21354      176635 :             __pyx_t_11 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_dist.data + __pyx_t_10 * __pyx_v_dist.strides[0]) ))) == ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_dist.data + __pyx_t_13 * __pyx_v_dist.strides[0]) ))) + 1));
   21355      176635 :             if (__pyx_t_11) {
   21356             : 
   21357             :               /* "scipy/sparse/csgraph/_matching.pyx":257
   21358             :  *                         yu = y[u]
   21359             :  *                         if dist[yu] == dist[v] + 1:
   21360             :  *                             could_augment = True             # <<<<<<<<<<<<<<
   21361             :  *                             # If yu is unmatched, we have found an augmenting
   21362             :  *                             # path. We update the matching and move on to the
   21363             :  */
   21364       38264 :               __pyx_v_could_augment = 1;
   21365             : 
   21366             :               /* "scipy/sparse/csgraph/_matching.pyx":261
   21367             :  *                             # path. We update the matching and move on to the
   21368             :  *                             # next unmatched vertex.
   21369             :  *                             if yu == i:             # <<<<<<<<<<<<<<
   21370             :  *                                 done = True
   21371             :  *                                 # Unwind and follow the path back to the root.
   21372             :  */
   21373       38264 :               __pyx_t_11 = (__pyx_v_yu == __pyx_v_i);
   21374       38264 :               if (__pyx_t_11) {
   21375             : 
   21376             :                 /* "scipy/sparse/csgraph/_matching.pyx":262
   21377             :  *                             # next unmatched vertex.
   21378             :  *                             if yu == i:
   21379             :  *                                 done = True             # <<<<<<<<<<<<<<
   21380             :  *                                 # Unwind and follow the path back to the root.
   21381             :  *                                 while True:
   21382             :  */
   21383       11636 :                 __pyx_v_done = 1;
   21384             : 
   21385             :                 /* "scipy/sparse/csgraph/_matching.pyx":264
   21386             :  *                                 done = True
   21387             :  *                                 # Unwind and follow the path back to the root.
   21388             :  *                                 while True:             # <<<<<<<<<<<<<<
   21389             :  *                                     # Mark v as visited to ensure that it
   21390             :  *                                     # features in only one augmenting path in
   21391             :  */
   21392       13173 :                 while (1) {
   21393             : 
   21394             :                   /* "scipy/sparse/csgraph/_matching.pyx":268
   21395             :  *                                     # features in only one augmenting path in
   21396             :  *                                     # this sequence of DFS runs.
   21397             :  *                                     dist[v] = INF             # <<<<<<<<<<<<<<
   21398             :  *                                     u_old = x[v]
   21399             :  *                                     y[u] = v
   21400             :  */
   21401       11636 :                   __pyx_t_13 = __pyx_v_v;
   21402       11636 :                   *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_dist.data + __pyx_t_13 * __pyx_v_dist.strides[0]) )) = __pyx_v_INF;
   21403             : 
   21404             :                   /* "scipy/sparse/csgraph/_matching.pyx":269
   21405             :  *                                     # this sequence of DFS runs.
   21406             :  *                                     dist[v] = INF
   21407             :  *                                     u_old = x[v]             # <<<<<<<<<<<<<<
   21408             :  *                                     y[u] = v
   21409             :  *                                     x[v] = u
   21410             :  */
   21411       11636 :                   __pyx_t_13 = __pyx_v_v;
   21412       11636 :                   __pyx_v_u_old = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_13 * __pyx_v_x.strides[0]) )));
   21413             : 
   21414             :                   /* "scipy/sparse/csgraph/_matching.pyx":270
   21415             :  *                                     dist[v] = INF
   21416             :  *                                     u_old = x[v]
   21417             :  *                                     y[u] = v             # <<<<<<<<<<<<<<
   21418             :  *                                     x[v] = u
   21419             :  *                                     u = u_old
   21420             :  */
   21421       11636 :                   __pyx_t_13 = __pyx_v_u;
   21422       11636 :                   *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_13 * __pyx_v_y.strides[0]) )) = __pyx_v_v;
   21423             : 
   21424             :                   /* "scipy/sparse/csgraph/_matching.pyx":271
   21425             :  *                                     u_old = x[v]
   21426             :  *                                     y[u] = v
   21427             :  *                                     x[v] = u             # <<<<<<<<<<<<<<
   21428             :  *                                     u = u_old
   21429             :  *                                     if v == w:
   21430             :  */
   21431       11636 :                   __pyx_t_13 = __pyx_v_v;
   21432       11636 :                   *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_13 * __pyx_v_x.strides[0]) )) = __pyx_v_u;
   21433             : 
   21434             :                   /* "scipy/sparse/csgraph/_matching.pyx":272
   21435             :  *                                     y[u] = v
   21436             :  *                                     x[v] = u
   21437             :  *                                     u = u_old             # <<<<<<<<<<<<<<
   21438             :  *                                     if v == w:
   21439             :  *                                         break
   21440             :  */
   21441       11636 :                   __pyx_v_u = __pyx_v_u_old;
   21442             : 
   21443             :                   /* "scipy/sparse/csgraph/_matching.pyx":273
   21444             :  *                                     x[v] = u
   21445             :  *                                     u = u_old
   21446             :  *                                     if v == w:             # <<<<<<<<<<<<<<
   21447             :  *                                         break
   21448             :  *                                     v = parents[v]
   21449             :  */
   21450       11636 :                   __pyx_t_11 = (__pyx_v_v == __pyx_v_w);
   21451       11636 :                   if (__pyx_t_11) {
   21452             : 
   21453             :                     /* "scipy/sparse/csgraph/_matching.pyx":274
   21454             :  *                                     u = u_old
   21455             :  *                                     if v == w:
   21456             :  *                                         break             # <<<<<<<<<<<<<<
   21457             :  *                                     v = parents[v]
   21458             :  *                                 break
   21459             :  */
   21460       10099 :                     goto __pyx_L29_break;
   21461             : 
   21462             :                     /* "scipy/sparse/csgraph/_matching.pyx":273
   21463             :  *                                     x[v] = u
   21464             :  *                                     u = u_old
   21465             :  *                                     if v == w:             # <<<<<<<<<<<<<<
   21466             :  *                                         break
   21467             :  *                                     v = parents[v]
   21468             :  */
   21469             :                   }
   21470             : 
   21471             :                   /* "scipy/sparse/csgraph/_matching.pyx":275
   21472             :  *                                     if v == w:
   21473             :  *                                         break
   21474             :  *                                     v = parents[v]             # <<<<<<<<<<<<<<
   21475             :  *                                 break
   21476             :  *                             stack[stack_head] = yu
   21477             :  */
   21478        1537 :                   __pyx_t_13 = __pyx_v_v;
   21479        1537 :                   __pyx_v_v = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_parents.data + __pyx_t_13 * __pyx_v_parents.strides[0]) )));
   21480             :                 }
   21481       10099 :                 __pyx_L29_break:;
   21482             : 
   21483             :                 /* "scipy/sparse/csgraph/_matching.pyx":276
   21484             :  *                                         break
   21485             :  *                                     v = parents[v]
   21486             :  *                                 break             # <<<<<<<<<<<<<<
   21487             :  *                             stack[stack_head] = yu
   21488             :  *                             stack_head += 1
   21489             :  */
   21490       10099 :                 goto __pyx_L25_break;
   21491             : 
   21492             :                 /* "scipy/sparse/csgraph/_matching.pyx":261
   21493             :  *                             # path. We update the matching and move on to the
   21494             :  *                             # next unmatched vertex.
   21495             :  *                             if yu == i:             # <<<<<<<<<<<<<<
   21496             :  *                                 done = True
   21497             :  *                                 # Unwind and follow the path back to the root.
   21498             :  */
   21499             :               }
   21500             : 
   21501             :               /* "scipy/sparse/csgraph/_matching.pyx":277
   21502             :  *                                     v = parents[v]
   21503             :  *                                 break
   21504             :  *                             stack[stack_head] = yu             # <<<<<<<<<<<<<<
   21505             :  *                             stack_head += 1
   21506             :  *                             parents[yu] = v
   21507             :  */
   21508       28165 :               __pyx_t_13 = __pyx_v_stack_head;
   21509       28165 :               *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_stack.data + __pyx_t_13 * __pyx_v_stack.strides[0]) )) = __pyx_v_yu;
   21510             : 
   21511             :               /* "scipy/sparse/csgraph/_matching.pyx":278
   21512             :  *                                 break
   21513             :  *                             stack[stack_head] = yu
   21514             :  *                             stack_head += 1             # <<<<<<<<<<<<<<
   21515             :  *                             parents[yu] = v
   21516             :  *                     if done:
   21517             :  */
   21518       28165 :               __pyx_v_stack_head = (__pyx_v_stack_head + 1);
   21519             : 
   21520             :               /* "scipy/sparse/csgraph/_matching.pyx":279
   21521             :  *                             stack[stack_head] = yu
   21522             :  *                             stack_head += 1
   21523             :  *                             parents[yu] = v             # <<<<<<<<<<<<<<
   21524             :  *                     if done:
   21525             :  *                         break
   21526             :  */
   21527       28165 :               __pyx_t_13 = __pyx_v_yu;
   21528       28165 :               *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_parents.data + __pyx_t_13 * __pyx_v_parents.strides[0]) )) = __pyx_v_v;
   21529             : 
   21530             :               /* "scipy/sparse/csgraph/_matching.pyx":256
   21531             :  *                         u = indices[up]
   21532             :  *                         yu = y[u]
   21533             :  *                         if dist[yu] == dist[v] + 1:             # <<<<<<<<<<<<<<
   21534             :  *                             could_augment = True
   21535             :  *                             # If yu is unmatched, we have found an augmenting
   21536             :  */
   21537             :             }
   21538             :           }
   21539       24779 :           __pyx_L25_break:;
   21540             : 
   21541             :           /* "scipy/sparse/csgraph/_matching.pyx":280
   21542             :  *                             stack_head += 1
   21543             :  *                             parents[yu] = v
   21544             :  *                     if done:             # <<<<<<<<<<<<<<
   21545             :  *                         break
   21546             :  * 
   21547             :  */
   21548       34878 :           if (__pyx_v_done) {
   21549             : 
   21550             :             /* "scipy/sparse/csgraph/_matching.pyx":281
   21551             :  *                             parents[yu] = v
   21552             :  *                     if done:
   21553             :  *                         break             # <<<<<<<<<<<<<<
   21554             :  * 
   21555             :  *     for k in range(j):
   21556             :  */
   21557       10099 :             goto __pyx_L23_break;
   21558             : 
   21559             :             /* "scipy/sparse/csgraph/_matching.pyx":280
   21560             :  *                             stack_head += 1
   21561             :  *                             parents[yu] = v
   21562             :  *                     if done:             # <<<<<<<<<<<<<<
   21563             :  *                         break
   21564             :  * 
   21565             :  */
   21566             :           }
   21567             :         }
   21568       37509 :         __pyx_L23_break:;
   21569             : 
   21570             :         /* "scipy/sparse/csgraph/_matching.pyx":243
   21571             :  *         # Depth-first search starting from every unmatched vertex.
   21572             :  *         for w in range(i):
   21573             :  *             if x[w] < 0:             # <<<<<<<<<<<<<<
   21574             :  *                 done = False
   21575             :  *                 # Initialize stack to contain only w and reset path.
   21576             :  */
   21577             :       }
   21578             :     }
   21579             :   }
   21580         135 :   __pyx_L8_break:;
   21581             : 
   21582             :   /* "scipy/sparse/csgraph/_matching.pyx":283
   21583             :  *                         break
   21584             :  * 
   21585             :  *     for k in range(j):             # <<<<<<<<<<<<<<
   21586             :  *         if y[k] == i:
   21587             :  *             y[k] = -1
   21588             :  */
   21589         135 :   __pyx_t_6 = __pyx_v_j;
   21590         135 :   __pyx_t_8 = __pyx_t_6;
   21591       10330 :   for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
   21592       10195 :     __pyx_v_k = __pyx_t_9;
   21593             : 
   21594             :     /* "scipy/sparse/csgraph/_matching.pyx":284
   21595             :  * 
   21596             :  *     for k in range(j):
   21597             :  *         if y[k] == i:             # <<<<<<<<<<<<<<
   21598             :  *             y[k] = -1
   21599             :  * 
   21600             :  */
   21601       10195 :     __pyx_t_12 = __pyx_v_k;
   21602       10195 :     __pyx_t_11 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_12 * __pyx_v_y.strides[0]) ))) == __pyx_v_i);
   21603       10195 :     if (__pyx_t_11) {
   21604             : 
   21605             :       /* "scipy/sparse/csgraph/_matching.pyx":285
   21606             :  *     for k in range(j):
   21607             :  *         if y[k] == i:
   21608             :  *             y[k] = -1             # <<<<<<<<<<<<<<
   21609             :  * 
   21610             :  *     return x, y
   21611             :  */
   21612          96 :       __pyx_t_12 = __pyx_v_k;
   21613          96 :       *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_12 * __pyx_v_y.strides[0]) )) = -1;
   21614             : 
   21615             :       /* "scipy/sparse/csgraph/_matching.pyx":284
   21616             :  * 
   21617             :  *     for k in range(j):
   21618             :  *         if y[k] == i:             # <<<<<<<<<<<<<<
   21619             :  *             y[k] = -1
   21620             :  * 
   21621             :  */
   21622             :     }
   21623             :   }
   21624             : 
   21625             :   /* "scipy/sparse/csgraph/_matching.pyx":287
   21626             :  *             y[k] = -1
   21627             :  * 
   21628             :  *     return x, y             # <<<<<<<<<<<<<<
   21629             :  * 
   21630             :  * 
   21631             :  */
   21632         135 :   __Pyx_XDECREF(__pyx_r);
   21633         135 :   __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_x, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error)
   21634         135 :   __Pyx_GOTREF(__pyx_t_3);
   21635         135 :   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_y, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error)
   21636         135 :   __Pyx_GOTREF(__pyx_t_1);
   21637         135 :   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
   21638         135 :   __Pyx_GOTREF(__pyx_t_2);
   21639         135 :   __Pyx_GIVEREF(__pyx_t_3);
   21640         135 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error);
   21641         135 :   __Pyx_GIVEREF(__pyx_t_1);
   21642         135 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error);
   21643         135 :   __pyx_t_3 = 0;
   21644         135 :   __pyx_t_1 = 0;
   21645         135 :   __pyx_r = ((PyObject*)__pyx_t_2);
   21646         135 :   __pyx_t_2 = 0;
   21647         135 :   goto __pyx_L0;
   21648             : 
   21649             :   /* "scipy/sparse/csgraph/_matching.pyx":152
   21650             :  * @cython.boundscheck(False)
   21651             :  * @cython.wraparound(False)
   21652             :  * cdef tuple _hopcroft_karp(const ITYPE_t[:] indices, const ITYPE_t[:] indptr,             # <<<<<<<<<<<<<<
   21653             :  *                           const ITYPE_t i, const ITYPE_t j):
   21654             :  *     cdef ITYPE_t INF = np.iinfo(ITYPE).max
   21655             :  */
   21656             : 
   21657             :   /* function exit code */
   21658           0 :   __pyx_L1_error:;
   21659           0 :   __Pyx_XDECREF(__pyx_t_1);
   21660           0 :   __Pyx_XDECREF(__pyx_t_2);
   21661           0 :   __Pyx_XDECREF(__pyx_t_3);
   21662           0 :   __Pyx_XDECREF(__pyx_t_4);
   21663           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_7, 1);
   21664           0 :   __Pyx_AddTraceback("scipy.sparse.csgraph._matching._hopcroft_karp", __pyx_clineno, __pyx_lineno, __pyx_filename);
   21665           0 :   __pyx_r = 0;
   21666         135 :   __pyx_L0:;
   21667         135 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_x, 1);
   21668         135 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_y, 1);
   21669         135 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_dist, 1);
   21670         135 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_q, 1);
   21671         135 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_stack, 1);
   21672         135 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_parents, 1);
   21673         135 :   __Pyx_XGIVEREF(__pyx_r);
   21674         135 :   __Pyx_RefNannyFinishContext();
   21675         135 :   return __pyx_r;
   21676             : }
   21677             : 
   21678             : /* "scipy/sparse/csgraph/_matching.pyx":290
   21679             :  * 
   21680             :  * 
   21681             :  * def min_weight_full_bipartite_matching(biadjacency, maximize=False):             # <<<<<<<<<<<<<<
   21682             :  *     r"""
   21683             :  *     min_weight_full_bipartite_matching(biadjacency, maximize=False)
   21684             :  */
   21685             : 
   21686             : /* Python wrapper */
   21687             : static PyObject *__pyx_pw_5scipy_6sparse_7csgraph_9_matching_3min_weight_full_bipartite_matching(PyObject *__pyx_self, 
   21688             : #if CYTHON_METH_FASTCALL
   21689             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   21690             : #else
   21691             : PyObject *__pyx_args, PyObject *__pyx_kwds
   21692             : #endif
   21693             : ); /*proto*/
   21694             : PyDoc_STRVAR(__pyx_doc_5scipy_6sparse_7csgraph_9_matching_2min_weight_full_bipartite_matching, "\n    min_weight_full_bipartite_matching(biadjacency, maximize=False)\n\n    Returns the minimum weight full matching of a bipartite graph.\n\n    .. versionadded:: 1.6.0\n\n    Parameters\n    ----------\n    biadjacency : sparse array or matrix\n        Biadjacency matrix of the bipartite graph: A sparse array in CSR, CSC,\n        or COO format whose rows represent one partition of the graph and whose\n        columns represent the other partition. An edge between two vertices is\n        indicated by the corresponding entry in the matrix, and the weight of\n        the edge is given by the value of that entry. This should not be\n        confused with the full adjacency matrix of the graph, as we only need\n        the submatrix defining the bipartite structure.\n\n    maximize : bool (default: False)\n        Calculates a maximum weight matching if true.\n\n    Returns\n    -------\n    row_ind, col_ind : array\n        An array of row indices and one of corresponding column indices giving\n        the optimal matching. The total weight of the matching can be computed\n        as ``graph[row_ind, col_ind].sum()``. The row indices will be\n        sorted; in the case of a square matrix they will be equal to\n        ``numpy.arange(graph.shape[0])``.\n\n    Notes\n    -----\n\n    Let :math:`G = ((U, V), E)` be a weighted bipartite graph with non-zero\n    weights :math:`w : E \\to \\mathbb{R} \\setminus \\{0\\}`. This function then\n    produces a matching :math:`M \\subseteq E` with cardinality\n\n    .. math::\n       \\lvert M \\rvert = \\min(\\lvert U \\rvert, \\lvert V \\rvert),\n\n    which minimizes the sum of the weights of the edges included in the\n    matching, :math:`\\sum_{e \\in M} w(e)`, or raises an error if no such\n    matching exists.\n\n    When :math:`\\lvert U \\rvert = \\lvert V \\rvert`, this is commonly\n    referred to as a perfect matching; here, since we allow\n    :math:`\\lvert U \\rvert` and :math:`\\lvert V \\rvert` to differ, we""\n    follow Karp [1]_ and refer to the matching as *full*.\n\n    This function implements the LAPJVsp algorithm [2]_, short for \"Linear\n    assignment problem, Jonker--Volgenant, sparse\".\n\n    The problem it solves is equivalent to the rectangular linear assignment\n    problem. [3]_ As such, this function can be used to solve the same problems\n    as :func:`scipy.optimize.linear_sum_assignment`. That function may perform\n    better when the input is dense, or for certain particular types of inputs,\n    such as those for which the :math:`(i, j)`'th entry is the distance between\n    two points in Euclidean space.\n\n    If no full matching exists, this function raises a ``ValueError``. For\n    determining the size of the largest matching in the graph, see\n    :func:`maximum_bipartite_matching`.\n\n    We require that weights are non-zero only to avoid issues with the handling\n    of explicit zeros when converting between different sparse representations.\n    Zero weights can be handled by adding a constant to all weights, so that\n    the resulting matrix contains no zeros.\n\n    If multiple valid solutions are possible, output may vary with SciPy and\n    Python version.\n\n    References\n    ----------\n    .. [1] Richard Manning Karp:\n       An algorithm to Solve the m x n Assignment Problem in Expected Time\n       O(mn log n).\n       Networks, 10(2):143-152, 1980.\n    .. [2] Roy Jonker and Anton Volgenant:\n       A Shortest Augmenting Path Algorithm for Dense and Sparse Linear\n       Assignment Problems.\n       Computing 38:325-340, 1987.\n    .. [3] https://en.wikipedia.org/wiki/Assignment_problem\n\n    Examples\n    --------\n    >>> from scipy.sparse import csr_array\n    >>> from scipy.sparse.csgraph import min_weight_full_bipartite_matching\n\n    Let us first consider an example in which all weights are equal:\n\n    >>> biadjacency = csr_array([[1, 1, 1], [1, 0, 0], [0, 1, 0]])\n\n    Here, all we get is a perfect matching of the g""raph:\n\n    >>> print(min_weight_full_bipartite_matching(biadjacency)[1])\n    [2 0 1]\n\n    That is, the first, second, and third rows are matched with the third,\n    first, and second column respectively. Note that in this example, the 0\n    in the input matrix does *not* correspond to an edge with weight 0, but\n    rather a pair of vertices not paired by an edge.\n\n    Note also that in this case, the output matches the result of applying\n    :func:`maximum_bipartite_matching`:\n\n    >>> from scipy.sparse.csgraph import maximum_bipartite_matching\n    >>> biadjacency = csr_array([[1, 1, 1], [1, 0, 0], [0, 1, 0]])\n    >>> print(maximum_bipartite_matching(biadjacency, perm_type='column'))\n    [2 0 1]\n\n    When multiple edges are available, the ones with lowest weights are\n    preferred:\n\n    >>> biadjacency = csr_array([[3, 3, 6], [4, 3, 5], [10, 1, 8]])\n    >>> row_ind, col_ind = min_weight_full_bipartite_matching(biadjacency)\n    >>> print(col_ind)\n    [0 2 1]\n\n    The total weight in this case is :math:`3 + 5 + 1 = 9`:\n\n    >>> print(biadjacency[row_ind, col_ind].sum())\n    9\n\n    When the matrix is not square, i.e. when the two partitions have different\n    cardinalities, the matching is as large as the smaller of the two\n    partitions:\n\n    >>> biadjacency = csr_array([[0, 1, 1], [0, 2, 3]])\n    >>> row_ind, col_ind = min_weight_full_bipartite_matching(biadjacency)\n    >>> print(row_ind, col_ind)\n    [0 1] [2 1]\n    >>> biadjacency = csr_array([[0, 1], [3, 1], [1, 4]])\n    >>> row_ind, col_ind = min_weight_full_bipartite_matching(biadjacency)\n    >>> print(row_ind, col_ind)\n    [0 2] [1 0]\n\n    When one or both of the partitions are empty, the matching is empty as\n    well:\n\n    >>> biadjacency = csr_array((2, 0))\n    >>> row_ind, col_ind = min_weight_full_bipartite_matching(biadjacency)\n    >>> print(row_ind, col_ind)\n    [] []\n\n    In general, we will always reach the same sum of weights as if we had used\n    :""func:`scipy.optimize.linear_sum_assignment` but note that for that one,\n    missing edges are represented by a array entry of ``float('inf')``. Let us\n    generate a random sparse array with integer entries between 1 and 10:\n\n    >>> import numpy as np\n    >>> from scipy.sparse import random_array\n    >>> from scipy.optimize import linear_sum_assignment\n    >>> sparse = random_array((10, 10), random_state=42, density=.5, format='coo') * 10\n    >>> sparse.data = np.ceil(sparse.data)\n    >>> dense = sparse.toarray()\n    >>> dense = np.full(sparse.shape, np.inf)\n    >>> dense[sparse.row, sparse.col] = sparse.data\n    >>> sparse = sparse.tocsr()\n    >>> row_ind, col_ind = linear_sum_assignment(dense)\n    >>> print(dense[row_ind, col_ind].sum())\n    28.0\n    >>> row_ind, col_ind = min_weight_full_bipartite_matching(sparse)\n    >>> print(sparse[row_ind, col_ind].sum())\n    28.0\n\n    ");
   21695             : static PyMethodDef __pyx_mdef_5scipy_6sparse_7csgraph_9_matching_3min_weight_full_bipartite_matching = {"min_weight_full_bipartite_matching", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_6sparse_7csgraph_9_matching_3min_weight_full_bipartite_matching, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5scipy_6sparse_7csgraph_9_matching_2min_weight_full_bipartite_matching};
   21696         111 : static PyObject *__pyx_pw_5scipy_6sparse_7csgraph_9_matching_3min_weight_full_bipartite_matching(PyObject *__pyx_self, 
   21697             : #if CYTHON_METH_FASTCALL
   21698             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   21699             : #else
   21700             : PyObject *__pyx_args, PyObject *__pyx_kwds
   21701             : #endif
   21702             : ) {
   21703         111 :   PyObject *__pyx_v_biadjacency = 0;
   21704         111 :   PyObject *__pyx_v_maximize = 0;
   21705             :   #if !CYTHON_METH_FASTCALL
   21706             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   21707             :   #endif
   21708         111 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   21709         111 :   PyObject* values[2] = {0,0};
   21710         111 :   int __pyx_lineno = 0;
   21711         111 :   const char *__pyx_filename = NULL;
   21712         111 :   int __pyx_clineno = 0;
   21713         111 :   PyObject *__pyx_r = 0;
   21714             :   __Pyx_RefNannyDeclarations
   21715         111 :   __Pyx_RefNannySetupContext("min_weight_full_bipartite_matching (wrapper)", 0);
   21716             :   #if !CYTHON_METH_FASTCALL
   21717             :   #if CYTHON_ASSUME_SAFE_MACROS
   21718             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   21719             :   #else
   21720             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   21721             :   #endif
   21722             :   #endif
   21723         111 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   21724             :   {
   21725         111 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_biadjacency,&__pyx_n_s_maximize,0};
   21726         111 :     values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
   21727         111 :     if (__pyx_kwds) {
   21728           0 :       Py_ssize_t kw_args;
   21729           0 :       switch (__pyx_nargs) {
   21730           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   21731           0 :         CYTHON_FALLTHROUGH;
   21732           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   21733           0 :         CYTHON_FALLTHROUGH;
   21734           0 :         case  0: break;
   21735           0 :         default: goto __pyx_L5_argtuple_error;
   21736             :       }
   21737           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   21738           0 :       switch (__pyx_nargs) {
   21739             :         case  0:
   21740           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_biadjacency)) != 0)) {
   21741           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   21742           0 :           kw_args--;
   21743             :         }
   21744           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 290, __pyx_L3_error)
   21745           0 :         else goto __pyx_L5_argtuple_error;
   21746           0 :         CYTHON_FALLTHROUGH;
   21747             :         case  1:
   21748           0 :         if (kw_args > 0) {
   21749           0 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_maximize);
   21750           0 :           if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   21751           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 290, __pyx_L3_error)
   21752             :         }
   21753             :       }
   21754           0 :       if (unlikely(kw_args > 0)) {
   21755           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   21756           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "min_weight_full_bipartite_matching") < 0)) __PYX_ERR(0, 290, __pyx_L3_error)
   21757             :       }
   21758             :     } else {
   21759         111 :       switch (__pyx_nargs) {
   21760           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   21761         111 :         CYTHON_FALLTHROUGH;
   21762         111 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   21763         111 :         break;
   21764           0 :         default: goto __pyx_L5_argtuple_error;
   21765             :       }
   21766             :     }
   21767         111 :     __pyx_v_biadjacency = values[0];
   21768         111 :     __pyx_v_maximize = values[1];
   21769             :   }
   21770         111 :   goto __pyx_L6_skip;
   21771           0 :   __pyx_L5_argtuple_error:;
   21772           0 :   __Pyx_RaiseArgtupleInvalid("min_weight_full_bipartite_matching", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 290, __pyx_L3_error)
   21773         111 :   __pyx_L6_skip:;
   21774         111 :   goto __pyx_L4_argument_unpacking_done;
   21775           0 :   __pyx_L3_error:;
   21776             :   {
   21777           0 :     Py_ssize_t __pyx_temp;
   21778           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   21779             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   21780             :     }
   21781             :   }
   21782           0 :   __Pyx_AddTraceback("scipy.sparse.csgraph._matching.min_weight_full_bipartite_matching", __pyx_clineno, __pyx_lineno, __pyx_filename);
   21783           0 :   __Pyx_RefNannyFinishContext();
   21784           0 :   return NULL;
   21785         111 :   __pyx_L4_argument_unpacking_done:;
   21786         111 :   __pyx_r = __pyx_pf_5scipy_6sparse_7csgraph_9_matching_2min_weight_full_bipartite_matching(__pyx_self, __pyx_v_biadjacency, __pyx_v_maximize);
   21787             : 
   21788             :   /* function exit code */
   21789             :   {
   21790         111 :     Py_ssize_t __pyx_temp;
   21791         111 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   21792             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   21793             :     }
   21794             :   }
   21795             :   __Pyx_RefNannyFinishContext();
   21796             :   return __pyx_r;
   21797             : }
   21798             : 
   21799         111 : static PyObject *__pyx_pf_5scipy_6sparse_7csgraph_9_matching_2min_weight_full_bipartite_matching(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_biadjacency, PyObject *__pyx_v_maximize) {
   21800         111 :   PyObject *__pyx_v_i = NULL;
   21801         111 :   PyObject *__pyx_v_j = NULL;
   21802         111 :   PyObject *__pyx_v_a = NULL;
   21803         111 :   PyObject *__pyx_v_biadj_indices = NULL;
   21804         111 :   PyObject *__pyx_v_biadj_indptr = NULL;
   21805         111 :   PyObject *__pyx_v_biadjacency_t = NULL;
   21806         111 :   PyObject *__pyx_v_matching = NULL;
   21807         111 :   CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
   21808         111 :   PyObject *__pyx_v_b = NULL;
   21809         111 :   PyObject *__pyx_v_indices = NULL;
   21810         111 :   PyObject *__pyx_r = NULL;
   21811             :   __Pyx_RefNannyDeclarations
   21812         111 :   PyObject *__pyx_t_1 = NULL;
   21813         111 :   PyObject *__pyx_t_2 = NULL;
   21814         111 :   PyObject *__pyx_t_3 = NULL;
   21815         111 :   unsigned int __pyx_t_4;
   21816         111 :   int __pyx_t_5;
   21817         111 :   int __pyx_t_6;
   21818         111 :   PyObject *__pyx_t_7 = NULL;
   21819         111 :   PyObject *__pyx_t_8 = NULL;
   21820         111 :   PyObject *(*__pyx_t_9)(PyObject *);
   21821         111 :   PyObject *__pyx_t_10 = NULL;
   21822         111 :   __Pyx_memviewslice __pyx_t_11 = { 0, 0, { 0 }, { 0 }, { 0 } };
   21823         111 :   __Pyx_memviewslice __pyx_t_12 = { 0, 0, { 0 }, { 0 }, { 0 } };
   21824         111 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_13;
   21825         111 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_14;
   21826         111 :   __Pyx_memviewslice __pyx_t_15 = { 0, 0, { 0 }, { 0 }, { 0 } };
   21827         111 :   __Pyx_memviewslice __pyx_t_16 = { 0, 0, { 0 }, { 0 }, { 0 } };
   21828         111 :   __Pyx_memviewslice __pyx_t_17 = { 0, 0, { 0 }, { 0 }, { 0 } };
   21829         111 :   __Pyx_memviewslice __pyx_t_18 = { 0, 0, { 0 }, { 0 }, { 0 } };
   21830         111 :   int __pyx_lineno = 0;
   21831         111 :   const char *__pyx_filename = NULL;
   21832         111 :   int __pyx_clineno = 0;
   21833         111 :   __Pyx_RefNannySetupContext("min_weight_full_bipartite_matching", 0);
   21834         111 :   __Pyx_INCREF(__pyx_v_biadjacency);
   21835             : 
   21836             :   /* "scipy/sparse/csgraph/_matching.pyx":457
   21837             :  * 
   21838             :  *     """
   21839             :  *     biadjacency = convert_pydata_sparse_to_scipy(biadjacency)             # <<<<<<<<<<<<<<
   21840             :  *     if not issparse(biadjacency):
   21841             :  *         raise TypeError("graph must be sparse")
   21842             :  */
   21843         111 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_convert_pydata_sparse_to_scipy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error)
   21844         111 :   __Pyx_GOTREF(__pyx_t_2);
   21845         111 :   __pyx_t_3 = NULL;
   21846         111 :   __pyx_t_4 = 0;
   21847             :   #if CYTHON_UNPACK_METHODS
   21848         111 :   if (unlikely(PyMethod_Check(__pyx_t_2))) {
   21849           0 :     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
   21850           0 :     if (likely(__pyx_t_3)) {
   21851           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   21852           0 :       __Pyx_INCREF(__pyx_t_3);
   21853           0 :       __Pyx_INCREF(function);
   21854           0 :       __Pyx_DECREF_SET(__pyx_t_2, function);
   21855             :       __pyx_t_4 = 1;
   21856             :     }
   21857             :   }
   21858             :   #endif
   21859             :   {
   21860         111 :     PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_biadjacency};
   21861         111 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   21862         111 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   21863         111 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error)
   21864         111 :     __Pyx_GOTREF(__pyx_t_1);
   21865         111 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   21866             :   }
   21867         111 :   __Pyx_DECREF_SET(__pyx_v_biadjacency, __pyx_t_1);
   21868         111 :   __pyx_t_1 = 0;
   21869             : 
   21870             :   /* "scipy/sparse/csgraph/_matching.pyx":458
   21871             :  *     """
   21872             :  *     biadjacency = convert_pydata_sparse_to_scipy(biadjacency)
   21873             :  *     if not issparse(biadjacency):             # <<<<<<<<<<<<<<
   21874             :  *         raise TypeError("graph must be sparse")
   21875             :  *     if biadjacency.format not in ("csr", "csc", "coo"):
   21876             :  */
   21877         111 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_issparse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error)
   21878         111 :   __Pyx_GOTREF(__pyx_t_2);
   21879         111 :   __pyx_t_3 = NULL;
   21880         111 :   __pyx_t_4 = 0;
   21881             :   #if CYTHON_UNPACK_METHODS
   21882         111 :   if (unlikely(PyMethod_Check(__pyx_t_2))) {
   21883           0 :     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
   21884           0 :     if (likely(__pyx_t_3)) {
   21885           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   21886           0 :       __Pyx_INCREF(__pyx_t_3);
   21887           0 :       __Pyx_INCREF(function);
   21888           0 :       __Pyx_DECREF_SET(__pyx_t_2, function);
   21889             :       __pyx_t_4 = 1;
   21890             :     }
   21891             :   }
   21892             :   #endif
   21893             :   {
   21894         111 :     PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_biadjacency};
   21895         111 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   21896         111 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   21897         111 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error)
   21898         111 :     __Pyx_GOTREF(__pyx_t_1);
   21899         111 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   21900             :   }
   21901         111 :   __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 458, __pyx_L1_error)
   21902         111 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21903         111 :   __pyx_t_6 = (!__pyx_t_5);
   21904         111 :   if (unlikely(__pyx_t_6)) {
   21905             : 
   21906             :     /* "scipy/sparse/csgraph/_matching.pyx":459
   21907             :  *     biadjacency = convert_pydata_sparse_to_scipy(biadjacency)
   21908             :  *     if not issparse(biadjacency):
   21909             :  *         raise TypeError("graph must be sparse")             # <<<<<<<<<<<<<<
   21910             :  *     if biadjacency.format not in ("csr", "csc", "coo"):
   21911             :  *         raise TypeError("graph must be in CSC, CSR, or COO format.")
   21912             :  */
   21913           0 :     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L1_error)
   21914           0 :     __Pyx_GOTREF(__pyx_t_1);
   21915           0 :     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
   21916           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21917           0 :     __PYX_ERR(0, 459, __pyx_L1_error)
   21918             : 
   21919             :     /* "scipy/sparse/csgraph/_matching.pyx":458
   21920             :  *     """
   21921             :  *     biadjacency = convert_pydata_sparse_to_scipy(biadjacency)
   21922             :  *     if not issparse(biadjacency):             # <<<<<<<<<<<<<<
   21923             :  *         raise TypeError("graph must be sparse")
   21924             :  *     if biadjacency.format not in ("csr", "csc", "coo"):
   21925             :  */
   21926             :   }
   21927             : 
   21928             :   /* "scipy/sparse/csgraph/_matching.pyx":460
   21929             :  *     if not issparse(biadjacency):
   21930             :  *         raise TypeError("graph must be sparse")
   21931             :  *     if biadjacency.format not in ("csr", "csc", "coo"):             # <<<<<<<<<<<<<<
   21932             :  *         raise TypeError("graph must be in CSC, CSR, or COO format.")
   21933             :  * 
   21934             :  */
   21935         111 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error)
   21936         111 :   __Pyx_GOTREF(__pyx_t_1);
   21937         111 :   __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_csr, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 460, __pyx_L1_error)
   21938         111 :   if (__pyx_t_5) {
   21939           0 :   } else {
   21940         111 :     __pyx_t_6 = __pyx_t_5;
   21941         111 :     goto __pyx_L5_bool_binop_done;
   21942             :   }
   21943           0 :   __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_csc, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 460, __pyx_L1_error)
   21944           0 :   if (__pyx_t_5) {
   21945           0 :   } else {
   21946           0 :     __pyx_t_6 = __pyx_t_5;
   21947           0 :     goto __pyx_L5_bool_binop_done;
   21948             :   }
   21949           0 :   __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_coo, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 460, __pyx_L1_error)
   21950             :   __pyx_t_6 = __pyx_t_5;
   21951         111 :   __pyx_L5_bool_binop_done:;
   21952         111 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21953         111 :   __pyx_t_5 = __pyx_t_6;
   21954         111 :   if (unlikely(__pyx_t_5)) {
   21955             : 
   21956             :     /* "scipy/sparse/csgraph/_matching.pyx":461
   21957             :  *         raise TypeError("graph must be sparse")
   21958             :  *     if biadjacency.format not in ("csr", "csc", "coo"):
   21959             :  *         raise TypeError("graph must be in CSC, CSR, or COO format.")             # <<<<<<<<<<<<<<
   21960             :  * 
   21961             :  *     if not (np.issubdtype(biadjacency.dtype, np.number) or
   21962             :  */
   21963           0 :     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error)
   21964           0 :     __Pyx_GOTREF(__pyx_t_1);
   21965           0 :     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
   21966           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21967           0 :     __PYX_ERR(0, 461, __pyx_L1_error)
   21968             : 
   21969             :     /* "scipy/sparse/csgraph/_matching.pyx":460
   21970             :  *     if not issparse(biadjacency):
   21971             :  *         raise TypeError("graph must be sparse")
   21972             :  *     if biadjacency.format not in ("csr", "csc", "coo"):             # <<<<<<<<<<<<<<
   21973             :  *         raise TypeError("graph must be in CSC, CSR, or COO format.")
   21974             :  * 
   21975             :  */
   21976             :   }
   21977             : 
   21978             :   /* "scipy/sparse/csgraph/_matching.pyx":463
   21979             :  *         raise TypeError("graph must be in CSC, CSR, or COO format.")
   21980             :  * 
   21981             :  *     if not (np.issubdtype(biadjacency.dtype, np.number) or             # <<<<<<<<<<<<<<
   21982             :  *             biadjacency.dtype == np.dtype(np.bool_)):
   21983             :  *         raise ValueError("expected a matrix containing numerical entries, " +
   21984             :  */
   21985         111 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error)
   21986         111 :   __Pyx_GOTREF(__pyx_t_2);
   21987         111 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_issubdtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error)
   21988         111 :   __Pyx_GOTREF(__pyx_t_3);
   21989         111 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   21990         111 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error)
   21991         111 :   __Pyx_GOTREF(__pyx_t_2);
   21992         111 :   __pyx_t_7 = NULL;
   21993         111 :   __pyx_t_4 = 0;
   21994             :   #if CYTHON_UNPACK_METHODS
   21995         111 :   if (unlikely(PyMethod_Check(__pyx_t_3))) {
   21996           0 :     __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
   21997           0 :     if (likely(__pyx_t_7)) {
   21998           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   21999           0 :       __Pyx_INCREF(__pyx_t_7);
   22000           0 :       __Pyx_INCREF(function);
   22001           0 :       __Pyx_DECREF_SET(__pyx_t_3, function);
   22002             :       __pyx_t_4 = 1;
   22003             :     }
   22004             :   }
   22005             :   #endif
   22006             :   {
   22007         111 :     PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_2, ((PyObject *)__pyx_ptype_5numpy_number)};
   22008         111 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
   22009         111 :     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   22010         111 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   22011         111 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error)
   22012         111 :     __Pyx_GOTREF(__pyx_t_1);
   22013         111 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22014             :   }
   22015         111 :   __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 463, __pyx_L1_error)
   22016         111 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22017         111 :   if (!__pyx_t_6) {
   22018           0 :   } else {
   22019         111 :     __pyx_t_5 = __pyx_t_6;
   22020         111 :     goto __pyx_L9_bool_binop_done;
   22021             :   }
   22022             : 
   22023             :   /* "scipy/sparse/csgraph/_matching.pyx":464
   22024             :  * 
   22025             :  *     if not (np.issubdtype(biadjacency.dtype, np.number) or
   22026             :  *             biadjacency.dtype == np.dtype(np.bool_)):             # <<<<<<<<<<<<<<
   22027             :  *         raise ValueError("expected a matrix containing numerical entries, " +
   22028             :  *                          "got %s" % (biadjacency.dtype,))
   22029             :  */
   22030           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error)
   22031           0 :   __Pyx_GOTREF(__pyx_t_1);
   22032           0 :   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error)
   22033           0 :   __Pyx_GOTREF(__pyx_t_3);
   22034           0 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_bool); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 464, __pyx_L1_error)
   22035           0 :   __Pyx_GOTREF(__pyx_t_2);
   22036           0 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22037           0 :   __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error)
   22038           0 :   __Pyx_GOTREF(__pyx_t_3);
   22039           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   22040           0 :   __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 464, __pyx_L1_error)
   22041           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22042           0 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22043           0 :   __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 464, __pyx_L1_error)
   22044           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   22045             :   __pyx_t_5 = __pyx_t_6;
   22046         111 :   __pyx_L9_bool_binop_done:;
   22047             : 
   22048             :   /* "scipy/sparse/csgraph/_matching.pyx":463
   22049             :  *         raise TypeError("graph must be in CSC, CSR, or COO format.")
   22050             :  * 
   22051             :  *     if not (np.issubdtype(biadjacency.dtype, np.number) or             # <<<<<<<<<<<<<<
   22052             :  *             biadjacency.dtype == np.dtype(np.bool_)):
   22053             :  *         raise ValueError("expected a matrix containing numerical entries, " +
   22054             :  */
   22055         111 :   __pyx_t_6 = (!__pyx_t_5);
   22056         111 :   if (unlikely(__pyx_t_6)) {
   22057             : 
   22058             :     /* "scipy/sparse/csgraph/_matching.pyx":466
   22059             :  *             biadjacency.dtype == np.dtype(np.bool_)):
   22060             :  *         raise ValueError("expected a matrix containing numerical entries, " +
   22061             :  *                          "got %s" % (biadjacency.dtype,))             # <<<<<<<<<<<<<<
   22062             :  * 
   22063             :  *     biadjacency = biadjacency.astype(np.double)
   22064             :  */
   22065           0 :     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 466, __pyx_L1_error)
   22066           0 :     __Pyx_GOTREF(__pyx_t_2);
   22067           0 :     __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_2), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 466, __pyx_L1_error)
   22068           0 :     __Pyx_GOTREF(__pyx_t_3);
   22069           0 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   22070           0 :     __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_got_2, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 466, __pyx_L1_error)
   22071           0 :     __Pyx_GOTREF(__pyx_t_2);
   22072           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22073             : 
   22074             :     /* "scipy/sparse/csgraph/_matching.pyx":465
   22075             :  *     if not (np.issubdtype(biadjacency.dtype, np.number) or
   22076             :  *             biadjacency.dtype == np.dtype(np.bool_)):
   22077             :  *         raise ValueError("expected a matrix containing numerical entries, " +             # <<<<<<<<<<<<<<
   22078             :  *                          "got %s" % (biadjacency.dtype,))
   22079             :  * 
   22080             :  */
   22081           0 :     __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_expected_a_matrix_containing_num, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 465, __pyx_L1_error)
   22082           0 :     __Pyx_GOTREF(__pyx_t_3);
   22083           0 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   22084           0 :     __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error)
   22085           0 :     __Pyx_GOTREF(__pyx_t_2);
   22086           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22087           0 :     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
   22088           0 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   22089           0 :     __PYX_ERR(0, 465, __pyx_L1_error)
   22090             : 
   22091             :     /* "scipy/sparse/csgraph/_matching.pyx":463
   22092             :  *         raise TypeError("graph must be in CSC, CSR, or COO format.")
   22093             :  * 
   22094             :  *     if not (np.issubdtype(biadjacency.dtype, np.number) or             # <<<<<<<<<<<<<<
   22095             :  *             biadjacency.dtype == np.dtype(np.bool_)):
   22096             :  *         raise ValueError("expected a matrix containing numerical entries, " +
   22097             :  */
   22098             :   }
   22099             : 
   22100             :   /* "scipy/sparse/csgraph/_matching.pyx":468
   22101             :  *                          "got %s" % (biadjacency.dtype,))
   22102             :  * 
   22103             :  *     biadjacency = biadjacency.astype(np.double)             # <<<<<<<<<<<<<<
   22104             :  * 
   22105             :  *     if maximize:
   22106             :  */
   22107         111 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 468, __pyx_L1_error)
   22108         111 :   __Pyx_GOTREF(__pyx_t_3);
   22109         111 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error)
   22110         111 :   __Pyx_GOTREF(__pyx_t_1);
   22111         111 :   __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_double); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 468, __pyx_L1_error)
   22112         111 :   __Pyx_GOTREF(__pyx_t_7);
   22113         111 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22114         111 :   __pyx_t_1 = NULL;
   22115         111 :   __pyx_t_4 = 0;
   22116             :   #if CYTHON_UNPACK_METHODS
   22117         111 :   if (likely(PyMethod_Check(__pyx_t_3))) {
   22118         111 :     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
   22119         111 :     if (likely(__pyx_t_1)) {
   22120         111 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   22121         111 :       __Pyx_INCREF(__pyx_t_1);
   22122         111 :       __Pyx_INCREF(function);
   22123         111 :       __Pyx_DECREF_SET(__pyx_t_3, function);
   22124             :       __pyx_t_4 = 1;
   22125             :     }
   22126             :   }
   22127             :   #endif
   22128             :   {
   22129         111 :     PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_7};
   22130         111 :     __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   22131         111 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   22132         111 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   22133         111 :     if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 468, __pyx_L1_error)
   22134         111 :     __Pyx_GOTREF(__pyx_t_2);
   22135         111 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22136             :   }
   22137         111 :   __Pyx_DECREF_SET(__pyx_v_biadjacency, __pyx_t_2);
   22138         111 :   __pyx_t_2 = 0;
   22139             : 
   22140             :   /* "scipy/sparse/csgraph/_matching.pyx":470
   22141             :  *     biadjacency = biadjacency.astype(np.double)
   22142             :  * 
   22143             :  *     if maximize:             # <<<<<<<<<<<<<<
   22144             :  *         biadjacency = -biadjacency
   22145             :  * 
   22146             :  */
   22147         111 :   __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_maximize); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 470, __pyx_L1_error)
   22148         111 :   if (__pyx_t_6) {
   22149             : 
   22150             :     /* "scipy/sparse/csgraph/_matching.pyx":471
   22151             :  * 
   22152             :  *     if maximize:
   22153             :  *         biadjacency = -biadjacency             # <<<<<<<<<<<<<<
   22154             :  * 
   22155             :  *     # Change all infinities to zeros, then remove those zeros, but warn the
   22156             :  */
   22157           0 :     __pyx_t_2 = PyNumber_Negative(__pyx_v_biadjacency); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error)
   22158           0 :     __Pyx_GOTREF(__pyx_t_2);
   22159           0 :     __Pyx_DECREF_SET(__pyx_v_biadjacency, __pyx_t_2);
   22160             :     __pyx_t_2 = 0;
   22161             : 
   22162             :     /* "scipy/sparse/csgraph/_matching.pyx":470
   22163             :  *     biadjacency = biadjacency.astype(np.double)
   22164             :  * 
   22165             :  *     if maximize:             # <<<<<<<<<<<<<<
   22166             :  *         biadjacency = -biadjacency
   22167             :  * 
   22168             :  */
   22169             :   }
   22170             : 
   22171             :   /* "scipy/sparse/csgraph/_matching.pyx":475
   22172             :  *     # Change all infinities to zeros, then remove those zeros, but warn the
   22173             :  *     # user if any zeros were present in the first place.
   22174             :  *     if not np.all(biadjacency.data):             # <<<<<<<<<<<<<<
   22175             :  *         warnings.warn('explicit zero weights are removed before matching')
   22176             :  * 
   22177             :  */
   22178         111 :   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L1_error)
   22179         111 :   __Pyx_GOTREF(__pyx_t_3);
   22180         111 :   __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_all); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 475, __pyx_L1_error)
   22181         111 :   __Pyx_GOTREF(__pyx_t_7);
   22182         111 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22183         111 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L1_error)
   22184         111 :   __Pyx_GOTREF(__pyx_t_3);
   22185         111 :   __pyx_t_1 = NULL;
   22186         111 :   __pyx_t_4 = 0;
   22187             :   #if CYTHON_UNPACK_METHODS
   22188         111 :   if (unlikely(PyMethod_Check(__pyx_t_7))) {
   22189           0 :     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
   22190           0 :     if (likely(__pyx_t_1)) {
   22191           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
   22192           0 :       __Pyx_INCREF(__pyx_t_1);
   22193           0 :       __Pyx_INCREF(function);
   22194           0 :       __Pyx_DECREF_SET(__pyx_t_7, function);
   22195             :       __pyx_t_4 = 1;
   22196             :     }
   22197             :   }
   22198             :   #endif
   22199             :   {
   22200         111 :     PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_3};
   22201         111 :     __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   22202         111 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   22203         111 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22204         111 :     if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 475, __pyx_L1_error)
   22205         111 :     __Pyx_GOTREF(__pyx_t_2);
   22206         111 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   22207             :   }
   22208         111 :   __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 475, __pyx_L1_error)
   22209         111 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   22210         111 :   __pyx_t_5 = (!__pyx_t_6);
   22211         111 :   if (__pyx_t_5) {
   22212             : 
   22213             :     /* "scipy/sparse/csgraph/_matching.pyx":476
   22214             :  *     # user if any zeros were present in the first place.
   22215             :  *     if not np.all(biadjacency.data):
   22216             :  *         warnings.warn('explicit zero weights are removed before matching')             # <<<<<<<<<<<<<<
   22217             :  * 
   22218             :  *     biadjacency.data[np.isposinf(biadjacency.data)] = 0
   22219             :  */
   22220           1 :     __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_warnings); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 476, __pyx_L1_error)
   22221           1 :     __Pyx_GOTREF(__pyx_t_7);
   22222           1 :     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_warn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 476, __pyx_L1_error)
   22223           1 :     __Pyx_GOTREF(__pyx_t_3);
   22224           1 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   22225           1 :     __pyx_t_7 = NULL;
   22226           1 :     __pyx_t_4 = 0;
   22227             :     #if CYTHON_UNPACK_METHODS
   22228           1 :     if (unlikely(PyMethod_Check(__pyx_t_3))) {
   22229           0 :       __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
   22230           0 :       if (likely(__pyx_t_7)) {
   22231           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   22232           0 :         __Pyx_INCREF(__pyx_t_7);
   22233           0 :         __Pyx_INCREF(function);
   22234           0 :         __Pyx_DECREF_SET(__pyx_t_3, function);
   22235             :         __pyx_t_4 = 1;
   22236             :       }
   22237             :     }
   22238             :     #endif
   22239             :     {
   22240           1 :       PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_kp_u_explicit_zero_weights_are_remove};
   22241           1 :       __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   22242           1 :       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   22243           1 :       if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 476, __pyx_L1_error)
   22244           1 :       __Pyx_GOTREF(__pyx_t_2);
   22245           1 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22246             :     }
   22247           1 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   22248             : 
   22249             :     /* "scipy/sparse/csgraph/_matching.pyx":475
   22250             :  *     # Change all infinities to zeros, then remove those zeros, but warn the
   22251             :  *     # user if any zeros were present in the first place.
   22252             :  *     if not np.all(biadjacency.data):             # <<<<<<<<<<<<<<
   22253             :  *         warnings.warn('explicit zero weights are removed before matching')
   22254             :  * 
   22255             :  */
   22256             :   }
   22257             : 
   22258             :   /* "scipy/sparse/csgraph/_matching.pyx":478
   22259             :  *         warnings.warn('explicit zero weights are removed before matching')
   22260             :  * 
   22261             :  *     biadjacency.data[np.isposinf(biadjacency.data)] = 0             # <<<<<<<<<<<<<<
   22262             :  *     biadjacency.eliminate_zeros()
   22263             :  * 
   22264             :  */
   22265         111 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 478, __pyx_L1_error)
   22266         111 :   __Pyx_GOTREF(__pyx_t_2);
   22267         111 :   __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 478, __pyx_L1_error)
   22268         111 :   __Pyx_GOTREF(__pyx_t_7);
   22269         111 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_isposinf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error)
   22270         111 :   __Pyx_GOTREF(__pyx_t_1);
   22271         111 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   22272         111 :   __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_data); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 478, __pyx_L1_error)
   22273         111 :   __Pyx_GOTREF(__pyx_t_7);
   22274         111 :   __pyx_t_8 = NULL;
   22275         111 :   __pyx_t_4 = 0;
   22276             :   #if CYTHON_UNPACK_METHODS
   22277         111 :   if (unlikely(PyMethod_Check(__pyx_t_1))) {
   22278           0 :     __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
   22279           0 :     if (likely(__pyx_t_8)) {
   22280           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
   22281           0 :       __Pyx_INCREF(__pyx_t_8);
   22282           0 :       __Pyx_INCREF(function);
   22283           0 :       __Pyx_DECREF_SET(__pyx_t_1, function);
   22284             :       __pyx_t_4 = 1;
   22285             :     }
   22286             :   }
   22287             :   #endif
   22288             :   {
   22289         111 :     PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7};
   22290         111 :     __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   22291         111 :     __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
   22292         111 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   22293         111 :     if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 478, __pyx_L1_error)
   22294         111 :     __Pyx_GOTREF(__pyx_t_3);
   22295         111 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22296             :   }
   22297         111 :   if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_t_3, __pyx_int_0) < 0))) __PYX_ERR(0, 478, __pyx_L1_error)
   22298         111 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   22299         111 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22300             : 
   22301             :   /* "scipy/sparse/csgraph/_matching.pyx":479
   22302             :  * 
   22303             :  *     biadjacency.data[np.isposinf(biadjacency.data)] = 0
   22304             :  *     biadjacency.eliminate_zeros()             # <<<<<<<<<<<<<<
   22305             :  * 
   22306             :  *     i, j = biadjacency.shape
   22307             :  */
   22308         111 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_eliminate_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 479, __pyx_L1_error)
   22309         111 :   __Pyx_GOTREF(__pyx_t_2);
   22310         111 :   __pyx_t_1 = NULL;
   22311         111 :   __pyx_t_4 = 0;
   22312             :   #if CYTHON_UNPACK_METHODS
   22313         111 :   if (likely(PyMethod_Check(__pyx_t_2))) {
   22314         111 :     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
   22315         111 :     if (likely(__pyx_t_1)) {
   22316         111 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   22317         111 :       __Pyx_INCREF(__pyx_t_1);
   22318         111 :       __Pyx_INCREF(function);
   22319         111 :       __Pyx_DECREF_SET(__pyx_t_2, function);
   22320             :       __pyx_t_4 = 1;
   22321             :     }
   22322             :   }
   22323             :   #endif
   22324             :   {
   22325         111 :     PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
   22326         111 :     __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
   22327         111 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   22328         111 :     if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 479, __pyx_L1_error)
   22329         111 :     __Pyx_GOTREF(__pyx_t_3);
   22330         111 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   22331             :   }
   22332         111 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22333             : 
   22334             :   /* "scipy/sparse/csgraph/_matching.pyx":481
   22335             :  *     biadjacency.eliminate_zeros()
   22336             :  * 
   22337             :  *     i, j = biadjacency.shape             # <<<<<<<<<<<<<<
   22338             :  * 
   22339             :  *     a = np.arange(np.min(biadjacency.shape))
   22340             :  */
   22341         111 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 481, __pyx_L1_error)
   22342         111 :   __Pyx_GOTREF(__pyx_t_3);
   22343         111 :   if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
   22344         111 :     PyObject* sequence = __pyx_t_3;
   22345         111 :     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
   22346         111 :     if (unlikely(size != 2)) {
   22347           0 :       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
   22348           0 :       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
   22349           0 :       __PYX_ERR(0, 481, __pyx_L1_error)
   22350             :     }
   22351             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   22352         111 :     if (likely(PyTuple_CheckExact(sequence))) {
   22353         111 :       __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
   22354         111 :       __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
   22355             :     } else {
   22356           0 :       __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
   22357           0 :       __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
   22358             :     }
   22359         111 :     __Pyx_INCREF(__pyx_t_2);
   22360         111 :     __Pyx_INCREF(__pyx_t_1);
   22361             :     #else
   22362             :     __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error)
   22363             :     __Pyx_GOTREF(__pyx_t_2);
   22364             :     __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 481, __pyx_L1_error)
   22365             :     __Pyx_GOTREF(__pyx_t_1);
   22366             :     #endif
   22367         111 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22368             :   } else {
   22369           0 :     Py_ssize_t index = -1;
   22370           0 :     __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 481, __pyx_L1_error)
   22371           0 :     __Pyx_GOTREF(__pyx_t_7);
   22372           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22373           0 :     __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
   22374           0 :     index = 0; __pyx_t_2 = __pyx_t_9(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L13_unpacking_failed;
   22375           0 :     __Pyx_GOTREF(__pyx_t_2);
   22376           0 :     index = 1; __pyx_t_1 = __pyx_t_9(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L13_unpacking_failed;
   22377           0 :     __Pyx_GOTREF(__pyx_t_1);
   22378           0 :     if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_7), 2) < 0) __PYX_ERR(0, 481, __pyx_L1_error)
   22379           0 :     __pyx_t_9 = NULL;
   22380           0 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   22381           0 :     goto __pyx_L14_unpacking_done;
   22382           0 :     __pyx_L13_unpacking_failed:;
   22383           0 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   22384           0 :     __pyx_t_9 = NULL;
   22385           0 :     if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
   22386           0 :     __PYX_ERR(0, 481, __pyx_L1_error)
   22387           0 :     __pyx_L14_unpacking_done:;
   22388             :   }
   22389         111 :   __pyx_v_i = __pyx_t_2;
   22390         111 :   __pyx_t_2 = 0;
   22391         111 :   __pyx_v_j = __pyx_t_1;
   22392         111 :   __pyx_t_1 = 0;
   22393             : 
   22394             :   /* "scipy/sparse/csgraph/_matching.pyx":483
   22395             :  *     i, j = biadjacency.shape
   22396             :  * 
   22397             :  *     a = np.arange(np.min(biadjacency.shape))             # <<<<<<<<<<<<<<
   22398             :  * 
   22399             :  *     biadj_indices, biadj_indptr = _safe_downcast_indices(biadjacency)
   22400             :  */
   22401         111 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __pyx_L1_error)
   22402         111 :   __Pyx_GOTREF(__pyx_t_1);
   22403         111 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_arange); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 483, __pyx_L1_error)
   22404         111 :   __Pyx_GOTREF(__pyx_t_2);
   22405         111 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22406         111 :   __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 483, __pyx_L1_error)
   22407         111 :   __Pyx_GOTREF(__pyx_t_7);
   22408         111 :   __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_min); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 483, __pyx_L1_error)
   22409         111 :   __Pyx_GOTREF(__pyx_t_8);
   22410         111 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   22411         111 :   __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 483, __pyx_L1_error)
   22412         111 :   __Pyx_GOTREF(__pyx_t_7);
   22413         111 :   __pyx_t_10 = NULL;
   22414         111 :   __pyx_t_4 = 0;
   22415             :   #if CYTHON_UNPACK_METHODS
   22416         111 :   if (unlikely(PyMethod_Check(__pyx_t_8))) {
   22417           0 :     __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
   22418           0 :     if (likely(__pyx_t_10)) {
   22419           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
   22420           0 :       __Pyx_INCREF(__pyx_t_10);
   22421           0 :       __Pyx_INCREF(function);
   22422           0 :       __Pyx_DECREF_SET(__pyx_t_8, function);
   22423             :       __pyx_t_4 = 1;
   22424             :     }
   22425             :   }
   22426             :   #endif
   22427             :   {
   22428         111 :     PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_7};
   22429         111 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   22430         111 :     __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
   22431         111 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   22432         111 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __pyx_L1_error)
   22433         111 :     __Pyx_GOTREF(__pyx_t_1);
   22434         111 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22435             :   }
   22436         111 :   __pyx_t_8 = NULL;
   22437         111 :   __pyx_t_4 = 0;
   22438             :   #if CYTHON_UNPACK_METHODS
   22439         111 :   if (unlikely(PyMethod_Check(__pyx_t_2))) {
   22440           0 :     __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
   22441           0 :     if (likely(__pyx_t_8)) {
   22442           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   22443           0 :       __Pyx_INCREF(__pyx_t_8);
   22444           0 :       __Pyx_INCREF(function);
   22445           0 :       __Pyx_DECREF_SET(__pyx_t_2, function);
   22446             :       __pyx_t_4 = 1;
   22447             :     }
   22448             :   }
   22449             :   #endif
   22450             :   {
   22451         111 :     PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_1};
   22452         111 :     __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   22453         111 :     __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
   22454         111 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22455         111 :     if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 483, __pyx_L1_error)
   22456         111 :     __Pyx_GOTREF(__pyx_t_3);
   22457         111 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   22458             :   }
   22459         111 :   __pyx_v_a = __pyx_t_3;
   22460         111 :   __pyx_t_3 = 0;
   22461             : 
   22462             :   /* "scipy/sparse/csgraph/_matching.pyx":485
   22463             :  *     a = np.arange(np.min(biadjacency.shape))
   22464             :  * 
   22465             :  *     biadj_indices, biadj_indptr = _safe_downcast_indices(biadjacency)             # <<<<<<<<<<<<<<
   22466             :  *     if biadj_indices is not biadjacency.indices:
   22467             :  *         # create a new object without copying data
   22468             :  */
   22469         111 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_safe_downcast_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)
   22470         111 :   __Pyx_GOTREF(__pyx_t_2);
   22471         111 :   __pyx_t_1 = NULL;
   22472         111 :   __pyx_t_4 = 0;
   22473             :   #if CYTHON_UNPACK_METHODS
   22474         111 :   if (unlikely(PyMethod_Check(__pyx_t_2))) {
   22475           0 :     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
   22476           0 :     if (likely(__pyx_t_1)) {
   22477           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   22478           0 :       __Pyx_INCREF(__pyx_t_1);
   22479           0 :       __Pyx_INCREF(function);
   22480           0 :       __Pyx_DECREF_SET(__pyx_t_2, function);
   22481             :       __pyx_t_4 = 1;
   22482             :     }
   22483             :   }
   22484             :   #endif
   22485             :   {
   22486         111 :     PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_biadjacency};
   22487         111 :     __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   22488         111 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   22489         111 :     if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 485, __pyx_L1_error)
   22490         111 :     __Pyx_GOTREF(__pyx_t_3);
   22491         111 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   22492             :   }
   22493         111 :   if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
   22494         111 :     PyObject* sequence = __pyx_t_3;
   22495         111 :     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
   22496         111 :     if (unlikely(size != 2)) {
   22497           0 :       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
   22498           0 :       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
   22499           0 :       __PYX_ERR(0, 485, __pyx_L1_error)
   22500             :     }
   22501             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   22502         111 :     if (likely(PyTuple_CheckExact(sequence))) {
   22503         111 :       __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
   22504         111 :       __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
   22505             :     } else {
   22506           0 :       __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
   22507           0 :       __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
   22508             :     }
   22509         111 :     __Pyx_INCREF(__pyx_t_2);
   22510         111 :     __Pyx_INCREF(__pyx_t_1);
   22511             :     #else
   22512             :     __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)
   22513             :     __Pyx_GOTREF(__pyx_t_2);
   22514             :     __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
   22515             :     __Pyx_GOTREF(__pyx_t_1);
   22516             :     #endif
   22517         111 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22518             :   } else {
   22519           0 :     Py_ssize_t index = -1;
   22520           0 :     __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 485, __pyx_L1_error)
   22521           0 :     __Pyx_GOTREF(__pyx_t_8);
   22522           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22523           0 :     __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
   22524           0 :     index = 0; __pyx_t_2 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_2)) goto __pyx_L15_unpacking_failed;
   22525           0 :     __Pyx_GOTREF(__pyx_t_2);
   22526           0 :     index = 1; __pyx_t_1 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_1)) goto __pyx_L15_unpacking_failed;
   22527           0 :     __Pyx_GOTREF(__pyx_t_1);
   22528           0 :     if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 485, __pyx_L1_error)
   22529           0 :     __pyx_t_9 = NULL;
   22530           0 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22531           0 :     goto __pyx_L16_unpacking_done;
   22532           0 :     __pyx_L15_unpacking_failed:;
   22533           0 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22534           0 :     __pyx_t_9 = NULL;
   22535           0 :     if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
   22536           0 :     __PYX_ERR(0, 485, __pyx_L1_error)
   22537           0 :     __pyx_L16_unpacking_done:;
   22538             :   }
   22539         111 :   __pyx_v_biadj_indices = __pyx_t_2;
   22540         111 :   __pyx_t_2 = 0;
   22541         111 :   __pyx_v_biadj_indptr = __pyx_t_1;
   22542         111 :   __pyx_t_1 = 0;
   22543             : 
   22544             :   /* "scipy/sparse/csgraph/_matching.pyx":486
   22545             :  * 
   22546             :  *     biadj_indices, biadj_indptr = _safe_downcast_indices(biadjacency)
   22547             :  *     if biadj_indices is not biadjacency.indices:             # <<<<<<<<<<<<<<
   22548             :  *         # create a new object without copying data
   22549             :  *         biadjacency = csr_array((biadjacency.data, biadj_indices, biadj_indptr),
   22550             :  */
   22551         111 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error)
   22552         111 :   __Pyx_GOTREF(__pyx_t_3);
   22553         111 :   __pyx_t_5 = (__pyx_v_biadj_indices != __pyx_t_3);
   22554         111 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22555         111 :   if (__pyx_t_5) {
   22556             : 
   22557             :     /* "scipy/sparse/csgraph/_matching.pyx":488
   22558             :  *     if biadj_indices is not biadjacency.indices:
   22559             :  *         # create a new object without copying data
   22560             :  *         biadjacency = csr_array((biadjacency.data, biadj_indices, biadj_indptr),             # <<<<<<<<<<<<<<
   22561             :  *                                 shape=biadjacency.shape, dtype=biadjacency.dtype)
   22562             :  * 
   22563             :  */
   22564           1 :     __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_csr_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 488, __pyx_L1_error)
   22565           1 :     __Pyx_GOTREF(__pyx_t_3);
   22566           1 :     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
   22567           1 :     __Pyx_GOTREF(__pyx_t_1);
   22568           1 :     __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error)
   22569           1 :     __Pyx_GOTREF(__pyx_t_2);
   22570           1 :     __Pyx_GIVEREF(__pyx_t_1);
   22571           1 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error);
   22572           1 :     __Pyx_INCREF(__pyx_v_biadj_indices);
   22573           1 :     __Pyx_GIVEREF(__pyx_v_biadj_indices);
   22574           1 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_biadj_indices)) __PYX_ERR(0, 488, __pyx_L1_error);
   22575           1 :     __Pyx_INCREF(__pyx_v_biadj_indptr);
   22576           1 :     __Pyx_GIVEREF(__pyx_v_biadj_indptr);
   22577           1 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_biadj_indptr)) __PYX_ERR(0, 488, __pyx_L1_error);
   22578           1 :     __pyx_t_1 = 0;
   22579           1 :     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
   22580           1 :     __Pyx_GOTREF(__pyx_t_1);
   22581           1 :     __Pyx_GIVEREF(__pyx_t_2);
   22582           1 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error);
   22583           1 :     __pyx_t_2 = 0;
   22584             : 
   22585             :     /* "scipy/sparse/csgraph/_matching.pyx":489
   22586             :  *         # create a new object without copying data
   22587             :  *         biadjacency = csr_array((biadjacency.data, biadj_indices, biadj_indptr),
   22588             :  *                                 shape=biadjacency.shape, dtype=biadjacency.dtype)             # <<<<<<<<<<<<<<
   22589             :  * 
   22590             :  *     # The algorithm expects more columns than rows in the graph, so
   22591             :  */
   22592           1 :     __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error)
   22593           1 :     __Pyx_GOTREF(__pyx_t_2);
   22594           1 :     __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 489, __pyx_L1_error)
   22595           1 :     __Pyx_GOTREF(__pyx_t_8);
   22596           1 :     if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_8) < 0) __PYX_ERR(0, 489, __pyx_L1_error)
   22597           1 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22598           1 :     __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 489, __pyx_L1_error)
   22599           1 :     __Pyx_GOTREF(__pyx_t_8);
   22600           1 :     if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 489, __pyx_L1_error)
   22601           1 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22602             : 
   22603             :     /* "scipy/sparse/csgraph/_matching.pyx":488
   22604             :  *     if biadj_indices is not biadjacency.indices:
   22605             :  *         # create a new object without copying data
   22606             :  *         biadjacency = csr_array((biadjacency.data, biadj_indices, biadj_indptr),             # <<<<<<<<<<<<<<
   22607             :  *                                 shape=biadjacency.shape, dtype=biadjacency.dtype)
   22608             :  * 
   22609             :  */
   22610           1 :     __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 488, __pyx_L1_error)
   22611           1 :     __Pyx_GOTREF(__pyx_t_8);
   22612           1 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22613           1 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22614           1 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   22615           1 :     __Pyx_DECREF_SET(__pyx_v_biadjacency, __pyx_t_8);
   22616         111 :     __pyx_t_8 = 0;
   22617             : 
   22618             :     /* "scipy/sparse/csgraph/_matching.pyx":486
   22619             :  * 
   22620             :  *     biadj_indices, biadj_indptr = _safe_downcast_indices(biadjacency)
   22621             :  *     if biadj_indices is not biadjacency.indices:             # <<<<<<<<<<<<<<
   22622             :  *         # create a new object without copying data
   22623             :  *         biadjacency = csr_array((biadjacency.data, biadj_indices, biadj_indptr),
   22624             :  */
   22625             :   }
   22626             : 
   22627             :   /* "scipy/sparse/csgraph/_matching.pyx":497
   22628             :  *     # checking for infeasibility during the execution of _lapjvsp below
   22629             :  *     # instead, but some cases are not yet handled there.
   22630             :  *     if j < i:             # <<<<<<<<<<<<<<
   22631             :  *         biadjacency_t = biadjacency.T
   22632             :  *         if biadjacency_t.format != "csr":
   22633             :  */
   22634         111 :   __pyx_t_8 = PyObject_RichCompare(__pyx_v_j, __pyx_v_i, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 497, __pyx_L1_error)
   22635         111 :   __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 497, __pyx_L1_error)
   22636         111 :   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22637         111 :   if (__pyx_t_5) {
   22638             : 
   22639             :     /* "scipy/sparse/csgraph/_matching.pyx":498
   22640             :  *     # instead, but some cases are not yet handled there.
   22641             :  *     if j < i:
   22642             :  *         biadjacency_t = biadjacency.T             # <<<<<<<<<<<<<<
   22643             :  *         if biadjacency_t.format != "csr":
   22644             :  *             biadjacency_t = biadjacency_t.tocsr()
   22645             :  */
   22646           2 :     __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_T); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 498, __pyx_L1_error)
   22647           2 :     __Pyx_GOTREF(__pyx_t_8);
   22648           2 :     __pyx_v_biadjacency_t = __pyx_t_8;
   22649           2 :     __pyx_t_8 = 0;
   22650             : 
   22651             :     /* "scipy/sparse/csgraph/_matching.pyx":499
   22652             :  *     if j < i:
   22653             :  *         biadjacency_t = biadjacency.T
   22654             :  *         if biadjacency_t.format != "csr":             # <<<<<<<<<<<<<<
   22655             :  *             biadjacency_t = biadjacency_t.tocsr()
   22656             :  *         matching, _ = _hopcroft_karp(biadjacency_t.indices,
   22657             :  */
   22658           2 :     __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency_t, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 499, __pyx_L1_error)
   22659           2 :     __Pyx_GOTREF(__pyx_t_8);
   22660           2 :     __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_n_u_csr, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 499, __pyx_L1_error)
   22661           2 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22662           2 :     if (__pyx_t_5) {
   22663             : 
   22664             :       /* "scipy/sparse/csgraph/_matching.pyx":500
   22665             :  *         biadjacency_t = biadjacency.T
   22666             :  *         if biadjacency_t.format != "csr":
   22667             :  *             biadjacency_t = biadjacency_t.tocsr()             # <<<<<<<<<<<<<<
   22668             :  *         matching, _ = _hopcroft_karp(biadjacency_t.indices,
   22669             :  *                                      biadjacency_t.indptr,
   22670             :  */
   22671           2 :       __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency_t, __pyx_n_s_tocsr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
   22672           2 :       __Pyx_GOTREF(__pyx_t_2);
   22673           2 :       __pyx_t_1 = NULL;
   22674           2 :       __pyx_t_4 = 0;
   22675             :       #if CYTHON_UNPACK_METHODS
   22676           2 :       if (likely(PyMethod_Check(__pyx_t_2))) {
   22677           2 :         __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
   22678           2 :         if (likely(__pyx_t_1)) {
   22679           2 :           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   22680           2 :           __Pyx_INCREF(__pyx_t_1);
   22681           2 :           __Pyx_INCREF(function);
   22682           2 :           __Pyx_DECREF_SET(__pyx_t_2, function);
   22683             :           __pyx_t_4 = 1;
   22684             :         }
   22685             :       }
   22686             :       #endif
   22687             :       {
   22688           2 :         PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
   22689           2 :         __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
   22690           2 :         __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   22691           2 :         if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 500, __pyx_L1_error)
   22692           2 :         __Pyx_GOTREF(__pyx_t_8);
   22693           2 :         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   22694             :       }
   22695           2 :       __Pyx_DECREF_SET(__pyx_v_biadjacency_t, __pyx_t_8);
   22696           2 :       __pyx_t_8 = 0;
   22697             : 
   22698             :       /* "scipy/sparse/csgraph/_matching.pyx":499
   22699             :  *     if j < i:
   22700             :  *         biadjacency_t = biadjacency.T
   22701             :  *         if biadjacency_t.format != "csr":             # <<<<<<<<<<<<<<
   22702             :  *             biadjacency_t = biadjacency_t.tocsr()
   22703             :  *         matching, _ = _hopcroft_karp(biadjacency_t.indices,
   22704             :  */
   22705             :     }
   22706             : 
   22707             :     /* "scipy/sparse/csgraph/_matching.pyx":501
   22708             :  *         if biadjacency_t.format != "csr":
   22709             :  *             biadjacency_t = biadjacency_t.tocsr()
   22710             :  *         matching, _ = _hopcroft_karp(biadjacency_t.indices,             # <<<<<<<<<<<<<<
   22711             :  *                                      biadjacency_t.indptr,
   22712             :  *                                      j, i)
   22713             :  */
   22714           2 :     __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency_t, __pyx_n_s_indices); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 501, __pyx_L1_error)
   22715           2 :     __Pyx_GOTREF(__pyx_t_8);
   22716           2 :     __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t__const__(__pyx_t_8, 0); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 501, __pyx_L1_error)
   22717           2 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22718             : 
   22719             :     /* "scipy/sparse/csgraph/_matching.pyx":502
   22720             :  *             biadjacency_t = biadjacency_t.tocsr()
   22721             :  *         matching, _ = _hopcroft_karp(biadjacency_t.indices,
   22722             :  *                                      biadjacency_t.indptr,             # <<<<<<<<<<<<<<
   22723             :  *                                      j, i)
   22724             :  *         matching = np.asarray(matching)
   22725             :  */
   22726           2 :     __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency_t, __pyx_n_s_indptr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 502, __pyx_L1_error)
   22727           2 :     __Pyx_GOTREF(__pyx_t_8);
   22728           2 :     __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t__const__(__pyx_t_8, 0); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 502, __pyx_L1_error)
   22729           2 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22730             : 
   22731             :     /* "scipy/sparse/csgraph/_matching.pyx":503
   22732             :  *         matching, _ = _hopcroft_karp(biadjacency_t.indices,
   22733             :  *                                      biadjacency_t.indptr,
   22734             :  *                                      j, i)             # <<<<<<<<<<<<<<
   22735             :  *         matching = np.asarray(matching)
   22736             :  *         if np.sum(matching != -1) != min(i, j):
   22737             :  */
   22738           2 :     __pyx_t_13 = __Pyx_PyInt_As_npy_int32(__pyx_v_j); if (unlikely((__pyx_t_13 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 503, __pyx_L1_error)
   22739           2 :     __pyx_t_14 = __Pyx_PyInt_As_npy_int32(__pyx_v_i); if (unlikely((__pyx_t_14 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 503, __pyx_L1_error)
   22740             : 
   22741             :     /* "scipy/sparse/csgraph/_matching.pyx":501
   22742             :  *         if biadjacency_t.format != "csr":
   22743             :  *             biadjacency_t = biadjacency_t.tocsr()
   22744             :  *         matching, _ = _hopcroft_karp(biadjacency_t.indices,             # <<<<<<<<<<<<<<
   22745             :  *                                      biadjacency_t.indptr,
   22746             :  *                                      j, i)
   22747             :  */
   22748           2 :     __pyx_t_8 = __pyx_f_5scipy_6sparse_7csgraph_9_matching__hopcroft_karp(__pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 501, __pyx_L1_error)
   22749           2 :     __Pyx_GOTREF(__pyx_t_8);
   22750           2 :     __PYX_XCLEAR_MEMVIEW(&__pyx_t_11, 1);
   22751           2 :     __pyx_t_11.memview = NULL; __pyx_t_11.data = NULL;
   22752           2 :     __PYX_XCLEAR_MEMVIEW(&__pyx_t_12, 1);
   22753           2 :     __pyx_t_12.memview = NULL; __pyx_t_12.data = NULL;
   22754           2 :     if (likely(__pyx_t_8 != Py_None)) {
   22755           2 :       PyObject* sequence = __pyx_t_8;
   22756           2 :       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
   22757           2 :       if (unlikely(size != 2)) {
   22758           0 :         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
   22759           0 :         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
   22760           0 :         __PYX_ERR(0, 501, __pyx_L1_error)
   22761             :       }
   22762             :       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   22763           2 :       __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
   22764           2 :       __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
   22765           2 :       __Pyx_INCREF(__pyx_t_2);
   22766           2 :       __Pyx_INCREF(__pyx_t_1);
   22767             :       #else
   22768             :       __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
   22769             :       __Pyx_GOTREF(__pyx_t_2);
   22770             :       __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error)
   22771             :       __Pyx_GOTREF(__pyx_t_1);
   22772             :       #endif
   22773           2 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22774             :     } else {
   22775           0 :       __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 501, __pyx_L1_error)
   22776             :     }
   22777           2 :     __pyx_v_matching = __pyx_t_2;
   22778           2 :     __pyx_t_2 = 0;
   22779           2 :     __pyx_v__ = __pyx_t_1;
   22780           2 :     __pyx_t_1 = 0;
   22781             : 
   22782             :     /* "scipy/sparse/csgraph/_matching.pyx":504
   22783             :  *                                      biadjacency_t.indptr,
   22784             :  *                                      j, i)
   22785             :  *         matching = np.asarray(matching)             # <<<<<<<<<<<<<<
   22786             :  *         if np.sum(matching != -1) != min(i, j):
   22787             :  *             raise ValueError('no full matching exists')
   22788             :  */
   22789           2 :     __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error)
   22790           2 :     __Pyx_GOTREF(__pyx_t_1);
   22791           2 :     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 504, __pyx_L1_error)
   22792           2 :     __Pyx_GOTREF(__pyx_t_2);
   22793           2 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22794           2 :     __pyx_t_1 = NULL;
   22795           2 :     __pyx_t_4 = 0;
   22796             :     #if CYTHON_UNPACK_METHODS
   22797           2 :     if (unlikely(PyMethod_Check(__pyx_t_2))) {
   22798           0 :       __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
   22799           0 :       if (likely(__pyx_t_1)) {
   22800           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   22801           0 :         __Pyx_INCREF(__pyx_t_1);
   22802           0 :         __Pyx_INCREF(function);
   22803           0 :         __Pyx_DECREF_SET(__pyx_t_2, function);
   22804             :         __pyx_t_4 = 1;
   22805             :       }
   22806             :     }
   22807             :     #endif
   22808             :     {
   22809           2 :       PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_matching};
   22810           2 :       __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   22811           2 :       __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   22812           2 :       if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 504, __pyx_L1_error)
   22813           2 :       __Pyx_GOTREF(__pyx_t_8);
   22814           2 :       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   22815             :     }
   22816           2 :     __Pyx_DECREF_SET(__pyx_v_matching, __pyx_t_8);
   22817           2 :     __pyx_t_8 = 0;
   22818             : 
   22819             :     /* "scipy/sparse/csgraph/_matching.pyx":505
   22820             :  *                                      j, i)
   22821             :  *         matching = np.asarray(matching)
   22822             :  *         if np.sum(matching != -1) != min(i, j):             # <<<<<<<<<<<<<<
   22823             :  *             raise ValueError('no full matching exists')
   22824             :  *         b = np.asarray(_lapjvsp(biadjacency_t.indptr,
   22825             :  */
   22826           2 :     __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)
   22827           2 :     __Pyx_GOTREF(__pyx_t_2);
   22828           2 :     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error)
   22829           2 :     __Pyx_GOTREF(__pyx_t_1);
   22830           2 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   22831           2 :     __pyx_t_2 = __Pyx_PyInt_NeObjC(__pyx_v_matching, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)
   22832           2 :     __Pyx_GOTREF(__pyx_t_2);
   22833           2 :     __pyx_t_3 = NULL;
   22834           2 :     __pyx_t_4 = 0;
   22835             :     #if CYTHON_UNPACK_METHODS
   22836           2 :     if (unlikely(PyMethod_Check(__pyx_t_1))) {
   22837           0 :       __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
   22838           0 :       if (likely(__pyx_t_3)) {
   22839           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
   22840           0 :         __Pyx_INCREF(__pyx_t_3);
   22841           0 :         __Pyx_INCREF(function);
   22842           0 :         __Pyx_DECREF_SET(__pyx_t_1, function);
   22843             :         __pyx_t_4 = 1;
   22844             :       }
   22845             :     }
   22846             :     #endif
   22847             :     {
   22848           2 :       PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
   22849           2 :       __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   22850           2 :       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   22851           2 :       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   22852           2 :       if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 505, __pyx_L1_error)
   22853           2 :       __Pyx_GOTREF(__pyx_t_8);
   22854           2 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22855             :     }
   22856           2 :     __Pyx_INCREF(__pyx_v_j);
   22857           2 :     __pyx_t_1 = __pyx_v_j;
   22858           2 :     __Pyx_INCREF(__pyx_v_i);
   22859           2 :     __pyx_t_2 = __pyx_v_i;
   22860           2 :     __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 505, __pyx_L1_error)
   22861           2 :     __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 505, __pyx_L1_error)
   22862           2 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   22863           2 :     if (__pyx_t_5) {
   22864           2 :       __Pyx_INCREF(__pyx_t_1);
   22865             :       __pyx_t_3 = __pyx_t_1;
   22866             :     } else {
   22867           0 :       __Pyx_INCREF(__pyx_t_2);
   22868             :       __pyx_t_3 = __pyx_t_2;
   22869             :     }
   22870           2 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   22871           2 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22872           2 :     __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error)
   22873           2 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22874           2 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22875           2 :     __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 505, __pyx_L1_error)
   22876           2 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22877           2 :     if (unlikely(__pyx_t_5)) {
   22878             : 
   22879             :       /* "scipy/sparse/csgraph/_matching.pyx":506
   22880             :  *         matching = np.asarray(matching)
   22881             :  *         if np.sum(matching != -1) != min(i, j):
   22882             :  *             raise ValueError('no full matching exists')             # <<<<<<<<<<<<<<
   22883             :  *         b = np.asarray(_lapjvsp(biadjacency_t.indptr,
   22884             :  *                                 biadjacency_t.indices,
   22885             :  */
   22886           1 :       __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error)
   22887           1 :       __Pyx_GOTREF(__pyx_t_1);
   22888           1 :       __Pyx_Raise(__pyx_t_1, 0, 0, 0);
   22889           1 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22890           1 :       __PYX_ERR(0, 506, __pyx_L1_error)
   22891             : 
   22892             :       /* "scipy/sparse/csgraph/_matching.pyx":505
   22893             :  *                                      j, i)
   22894             :  *         matching = np.asarray(matching)
   22895             :  *         if np.sum(matching != -1) != min(i, j):             # <<<<<<<<<<<<<<
   22896             :  *             raise ValueError('no full matching exists')
   22897             :  *         b = np.asarray(_lapjvsp(biadjacency_t.indptr,
   22898             :  */
   22899             :     }
   22900             : 
   22901             :     /* "scipy/sparse/csgraph/_matching.pyx":507
   22902             :  *         if np.sum(matching != -1) != min(i, j):
   22903             :  *             raise ValueError('no full matching exists')
   22904             :  *         b = np.asarray(_lapjvsp(biadjacency_t.indptr,             # <<<<<<<<<<<<<<
   22905             :  *                                 biadjacency_t.indices,
   22906             :  *                                 biadjacency_t.data,
   22907             :  */
   22908           1 :     __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
   22909           1 :     __Pyx_GOTREF(__pyx_t_3);
   22910           1 :     __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 507, __pyx_L1_error)
   22911           1 :     __Pyx_GOTREF(__pyx_t_8);
   22912           1 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22913           1 :     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency_t, __pyx_n_s_indptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
   22914           1 :     __Pyx_GOTREF(__pyx_t_3);
   22915           1 :     __pyx_t_15 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_15.memview)) __PYX_ERR(0, 507, __pyx_L1_error)
   22916           1 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22917             : 
   22918             :     /* "scipy/sparse/csgraph/_matching.pyx":508
   22919             :  *             raise ValueError('no full matching exists')
   22920             :  *         b = np.asarray(_lapjvsp(biadjacency_t.indptr,
   22921             :  *                                 biadjacency_t.indices,             # <<<<<<<<<<<<<<
   22922             :  *                                 biadjacency_t.data,
   22923             :  *                                 j, i))
   22924             :  */
   22925           1 :     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency_t, __pyx_n_s_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 508, __pyx_L1_error)
   22926           1 :     __Pyx_GOTREF(__pyx_t_3);
   22927           1 :     __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 508, __pyx_L1_error)
   22928           1 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22929             : 
   22930             :     /* "scipy/sparse/csgraph/_matching.pyx":509
   22931             :  *         b = np.asarray(_lapjvsp(biadjacency_t.indptr,
   22932             :  *                                 biadjacency_t.indices,
   22933             :  *                                 biadjacency_t.data,             # <<<<<<<<<<<<<<
   22934             :  *                                 j, i))
   22935             :  *         indices = np.argsort(b)
   22936             :  */
   22937           1 :     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency_t, __pyx_n_s_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L1_error)
   22938           1 :     __Pyx_GOTREF(__pyx_t_3);
   22939           1 :     __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 509, __pyx_L1_error)
   22940           1 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22941             : 
   22942             :     /* "scipy/sparse/csgraph/_matching.pyx":510
   22943             :  *                                 biadjacency_t.indices,
   22944             :  *                                 biadjacency_t.data,
   22945             :  *                                 j, i))             # <<<<<<<<<<<<<<
   22946             :  *         indices = np.argsort(b)
   22947             :  *         return (b[indices], a[indices])
   22948             :  */
   22949           1 :     __pyx_t_14 = __Pyx_PyInt_As_npy_int32(__pyx_v_j); if (unlikely((__pyx_t_14 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 510, __pyx_L1_error)
   22950           1 :     __pyx_t_13 = __Pyx_PyInt_As_npy_int32(__pyx_v_i); if (unlikely((__pyx_t_13 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 510, __pyx_L1_error)
   22951             : 
   22952             :     /* "scipy/sparse/csgraph/_matching.pyx":507
   22953             :  *         if np.sum(matching != -1) != min(i, j):
   22954             :  *             raise ValueError('no full matching exists')
   22955             :  *         b = np.asarray(_lapjvsp(biadjacency_t.indptr,             # <<<<<<<<<<<<<<
   22956             :  *                                 biadjacency_t.indices,
   22957             :  *                                 biadjacency_t.data,
   22958             :  */
   22959           1 :     __pyx_t_18 = __pyx_f_5scipy_6sparse_7csgraph_9_matching__lapjvsp(__pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_14, __pyx_t_13); if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 507, __pyx_L1_error)
   22960           1 :     __PYX_XCLEAR_MEMVIEW(&__pyx_t_15, 1);
   22961           1 :     __pyx_t_15.memview = NULL; __pyx_t_15.data = NULL;
   22962           1 :     __PYX_XCLEAR_MEMVIEW(&__pyx_t_16, 1);
   22963           1 :     __pyx_t_16.memview = NULL; __pyx_t_16.data = NULL;
   22964           1 :     __PYX_XCLEAR_MEMVIEW(&__pyx_t_17, 1);
   22965           1 :     __pyx_t_17.memview = NULL; __pyx_t_17.data = NULL;
   22966           1 :     __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_18, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
   22967           1 :     __Pyx_GOTREF(__pyx_t_3);
   22968           1 :     __PYX_XCLEAR_MEMVIEW(&__pyx_t_18, 1);
   22969           1 :     __pyx_t_18.memview = NULL; __pyx_t_18.data = NULL;
   22970           1 :     __pyx_t_2 = NULL;
   22971           1 :     __pyx_t_4 = 0;
   22972             :     #if CYTHON_UNPACK_METHODS
   22973           1 :     if (unlikely(PyMethod_Check(__pyx_t_8))) {
   22974           0 :       __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
   22975           0 :       if (likely(__pyx_t_2)) {
   22976           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
   22977           0 :         __Pyx_INCREF(__pyx_t_2);
   22978           0 :         __Pyx_INCREF(function);
   22979           0 :         __Pyx_DECREF_SET(__pyx_t_8, function);
   22980             :         __pyx_t_4 = 1;
   22981             :       }
   22982             :     }
   22983             :     #endif
   22984             :     {
   22985           1 :       PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
   22986           1 :       __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   22987           1 :       __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   22988           1 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22989           1 :       if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error)
   22990           1 :       __Pyx_GOTREF(__pyx_t_1);
   22991           1 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22992             :     }
   22993           1 :     __pyx_v_b = __pyx_t_1;
   22994           1 :     __pyx_t_1 = 0;
   22995             : 
   22996             :     /* "scipy/sparse/csgraph/_matching.pyx":511
   22997             :  *                                 biadjacency_t.data,
   22998             :  *                                 j, i))
   22999             :  *         indices = np.argsort(b)             # <<<<<<<<<<<<<<
   23000             :  *         return (b[indices], a[indices])
   23001             :  *     else:
   23002             :  */
   23003           1 :     __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 511, __pyx_L1_error)
   23004           1 :     __Pyx_GOTREF(__pyx_t_8);
   23005           1 :     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_argsort); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
   23006           1 :     __Pyx_GOTREF(__pyx_t_3);
   23007           1 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   23008           1 :     __pyx_t_8 = NULL;
   23009           1 :     __pyx_t_4 = 0;
   23010             :     #if CYTHON_UNPACK_METHODS
   23011           1 :     if (unlikely(PyMethod_Check(__pyx_t_3))) {
   23012           0 :       __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
   23013           0 :       if (likely(__pyx_t_8)) {
   23014           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   23015           0 :         __Pyx_INCREF(__pyx_t_8);
   23016           0 :         __Pyx_INCREF(function);
   23017           0 :         __Pyx_DECREF_SET(__pyx_t_3, function);
   23018             :         __pyx_t_4 = 1;
   23019             :       }
   23020             :     }
   23021             :     #endif
   23022             :     {
   23023           1 :       PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_b};
   23024           1 :       __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   23025           1 :       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
   23026           1 :       if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
   23027           1 :       __Pyx_GOTREF(__pyx_t_1);
   23028           1 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   23029             :     }
   23030           1 :     __pyx_v_indices = __pyx_t_1;
   23031           1 :     __pyx_t_1 = 0;
   23032             : 
   23033             :     /* "scipy/sparse/csgraph/_matching.pyx":512
   23034             :  *                                 j, i))
   23035             :  *         indices = np.argsort(b)
   23036             :  *         return (b[indices], a[indices])             # <<<<<<<<<<<<<<
   23037             :  *     else:
   23038             :  *         if biadjacency.format != "csr":
   23039             :  */
   23040           1 :     __Pyx_XDECREF(__pyx_r);
   23041           1 :     __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_b, __pyx_v_indices); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error)
   23042           1 :     __Pyx_GOTREF(__pyx_t_1);
   23043           1 :     __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_a, __pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error)
   23044           1 :     __Pyx_GOTREF(__pyx_t_3);
   23045           1 :     __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 512, __pyx_L1_error)
   23046           1 :     __Pyx_GOTREF(__pyx_t_8);
   23047           1 :     __Pyx_GIVEREF(__pyx_t_1);
   23048           1 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error);
   23049           1 :     __Pyx_GIVEREF(__pyx_t_3);
   23050           1 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error);
   23051           1 :     __pyx_t_1 = 0;
   23052           1 :     __pyx_t_3 = 0;
   23053           1 :     __pyx_r = __pyx_t_8;
   23054           1 :     __pyx_t_8 = 0;
   23055           1 :     goto __pyx_L0;
   23056             : 
   23057             :     /* "scipy/sparse/csgraph/_matching.pyx":497
   23058             :  *     # checking for infeasibility during the execution of _lapjvsp below
   23059             :  *     # instead, but some cases are not yet handled there.
   23060             :  *     if j < i:             # <<<<<<<<<<<<<<
   23061             :  *         biadjacency_t = biadjacency.T
   23062             :  *         if biadjacency_t.format != "csr":
   23063             :  */
   23064             :   }
   23065             : 
   23066             :   /* "scipy/sparse/csgraph/_matching.pyx":514
   23067             :  *         return (b[indices], a[indices])
   23068             :  *     else:
   23069             :  *         if biadjacency.format != "csr":             # <<<<<<<<<<<<<<
   23070             :  *             biadjacency = biadjacency.tocsr()
   23071             :  *         matching, _ = _hopcroft_karp(biadjacency.indices,
   23072             :  */
   23073             :   /*else*/ {
   23074         109 :     __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 514, __pyx_L1_error)
   23075         109 :     __Pyx_GOTREF(__pyx_t_8);
   23076         109 :     __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_n_u_csr, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 514, __pyx_L1_error)
   23077         109 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   23078         109 :     if (__pyx_t_5) {
   23079             : 
   23080             :       /* "scipy/sparse/csgraph/_matching.pyx":515
   23081             :  *     else:
   23082             :  *         if biadjacency.format != "csr":
   23083             :  *             biadjacency = biadjacency.tocsr()             # <<<<<<<<<<<<<<
   23084             :  *         matching, _ = _hopcroft_karp(biadjacency.indices,
   23085             :  *                                      biadjacency.indptr,
   23086             :  */
   23087           0 :       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_tocsr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 515, __pyx_L1_error)
   23088           0 :       __Pyx_GOTREF(__pyx_t_3);
   23089           0 :       __pyx_t_1 = NULL;
   23090           0 :       __pyx_t_4 = 0;
   23091             :       #if CYTHON_UNPACK_METHODS
   23092           0 :       if (likely(PyMethod_Check(__pyx_t_3))) {
   23093           0 :         __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
   23094           0 :         if (likely(__pyx_t_1)) {
   23095           0 :           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   23096           0 :           __Pyx_INCREF(__pyx_t_1);
   23097           0 :           __Pyx_INCREF(function);
   23098           0 :           __Pyx_DECREF_SET(__pyx_t_3, function);
   23099             :           __pyx_t_4 = 1;
   23100             :         }
   23101             :       }
   23102             :       #endif
   23103             :       {
   23104           0 :         PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
   23105           0 :         __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
   23106           0 :         __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   23107           0 :         if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 515, __pyx_L1_error)
   23108           0 :         __Pyx_GOTREF(__pyx_t_8);
   23109           0 :         __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   23110             :       }
   23111           0 :       __Pyx_DECREF_SET(__pyx_v_biadjacency, __pyx_t_8);
   23112         109 :       __pyx_t_8 = 0;
   23113             : 
   23114             :       /* "scipy/sparse/csgraph/_matching.pyx":514
   23115             :  *         return (b[indices], a[indices])
   23116             :  *     else:
   23117             :  *         if biadjacency.format != "csr":             # <<<<<<<<<<<<<<
   23118             :  *             biadjacency = biadjacency.tocsr()
   23119             :  *         matching, _ = _hopcroft_karp(biadjacency.indices,
   23120             :  */
   23121             :     }
   23122             : 
   23123             :     /* "scipy/sparse/csgraph/_matching.pyx":516
   23124             :  *         if biadjacency.format != "csr":
   23125             :  *             biadjacency = biadjacency.tocsr()
   23126             :  *         matching, _ = _hopcroft_karp(biadjacency.indices,             # <<<<<<<<<<<<<<
   23127             :  *                                      biadjacency.indptr,
   23128             :  *                                      i, j)
   23129             :  */
   23130         109 :     __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_indices); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 516, __pyx_L1_error)
   23131         109 :     __Pyx_GOTREF(__pyx_t_8);
   23132         109 :     __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t__const__(__pyx_t_8, 0); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 516, __pyx_L1_error)
   23133         109 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   23134             : 
   23135             :     /* "scipy/sparse/csgraph/_matching.pyx":517
   23136             :  *             biadjacency = biadjacency.tocsr()
   23137             :  *         matching, _ = _hopcroft_karp(biadjacency.indices,
   23138             :  *                                      biadjacency.indptr,             # <<<<<<<<<<<<<<
   23139             :  *                                      i, j)
   23140             :  *         matching = np.asarray(matching)
   23141             :  */
   23142         109 :     __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_indptr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 517, __pyx_L1_error)
   23143         109 :     __Pyx_GOTREF(__pyx_t_8);
   23144         109 :     __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t__const__(__pyx_t_8, 0); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 517, __pyx_L1_error)
   23145         109 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   23146             : 
   23147             :     /* "scipy/sparse/csgraph/_matching.pyx":518
   23148             :  *         matching, _ = _hopcroft_karp(biadjacency.indices,
   23149             :  *                                      biadjacency.indptr,
   23150             :  *                                      i, j)             # <<<<<<<<<<<<<<
   23151             :  *         matching = np.asarray(matching)
   23152             :  *         if np.sum(matching != -1) != min(i, j):
   23153             :  */
   23154         109 :     __pyx_t_13 = __Pyx_PyInt_As_npy_int32(__pyx_v_i); if (unlikely((__pyx_t_13 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 518, __pyx_L1_error)
   23155         109 :     __pyx_t_14 = __Pyx_PyInt_As_npy_int32(__pyx_v_j); if (unlikely((__pyx_t_14 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 518, __pyx_L1_error)
   23156             : 
   23157             :     /* "scipy/sparse/csgraph/_matching.pyx":516
   23158             :  *         if biadjacency.format != "csr":
   23159             :  *             biadjacency = biadjacency.tocsr()
   23160             :  *         matching, _ = _hopcroft_karp(biadjacency.indices,             # <<<<<<<<<<<<<<
   23161             :  *                                      biadjacency.indptr,
   23162             :  *                                      i, j)
   23163             :  */
   23164         109 :     __pyx_t_8 = __pyx_f_5scipy_6sparse_7csgraph_9_matching__hopcroft_karp(__pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 516, __pyx_L1_error)
   23165         109 :     __Pyx_GOTREF(__pyx_t_8);
   23166         109 :     __PYX_XCLEAR_MEMVIEW(&__pyx_t_11, 1);
   23167         109 :     __pyx_t_11.memview = NULL; __pyx_t_11.data = NULL;
   23168         109 :     __PYX_XCLEAR_MEMVIEW(&__pyx_t_12, 1);
   23169         109 :     __pyx_t_12.memview = NULL; __pyx_t_12.data = NULL;
   23170         109 :     if (likely(__pyx_t_8 != Py_None)) {
   23171         109 :       PyObject* sequence = __pyx_t_8;
   23172         109 :       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
   23173         109 :       if (unlikely(size != 2)) {
   23174           0 :         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
   23175           0 :         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
   23176           0 :         __PYX_ERR(0, 516, __pyx_L1_error)
   23177             :       }
   23178             :       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   23179         109 :       __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
   23180         109 :       __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
   23181         109 :       __Pyx_INCREF(__pyx_t_3);
   23182         109 :       __Pyx_INCREF(__pyx_t_1);
   23183             :       #else
   23184             :       __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 516, __pyx_L1_error)
   23185             :       __Pyx_GOTREF(__pyx_t_3);
   23186             :       __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
   23187             :       __Pyx_GOTREF(__pyx_t_1);
   23188             :       #endif
   23189         109 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   23190             :     } else {
   23191           0 :       __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 516, __pyx_L1_error)
   23192             :     }
   23193         109 :     __pyx_v_matching = __pyx_t_3;
   23194         109 :     __pyx_t_3 = 0;
   23195         109 :     __pyx_v__ = __pyx_t_1;
   23196         109 :     __pyx_t_1 = 0;
   23197             : 
   23198             :     /* "scipy/sparse/csgraph/_matching.pyx":519
   23199             :  *                                      biadjacency.indptr,
   23200             :  *                                      i, j)
   23201             :  *         matching = np.asarray(matching)             # <<<<<<<<<<<<<<
   23202             :  *         if np.sum(matching != -1) != min(i, j):
   23203             :  *             raise ValueError('no full matching exists')
   23204             :  */
   23205         109 :     __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __pyx_L1_error)
   23206         109 :     __Pyx_GOTREF(__pyx_t_1);
   23207         109 :     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 519, __pyx_L1_error)
   23208         109 :     __Pyx_GOTREF(__pyx_t_3);
   23209         109 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23210         109 :     __pyx_t_1 = NULL;
   23211         109 :     __pyx_t_4 = 0;
   23212             :     #if CYTHON_UNPACK_METHODS
   23213         109 :     if (unlikely(PyMethod_Check(__pyx_t_3))) {
   23214           0 :       __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
   23215           0 :       if (likely(__pyx_t_1)) {
   23216           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   23217           0 :         __Pyx_INCREF(__pyx_t_1);
   23218           0 :         __Pyx_INCREF(function);
   23219           0 :         __Pyx_DECREF_SET(__pyx_t_3, function);
   23220             :         __pyx_t_4 = 1;
   23221             :       }
   23222             :     }
   23223             :     #endif
   23224             :     {
   23225         109 :       PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_matching};
   23226         109 :       __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   23227         109 :       __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   23228         109 :       if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 519, __pyx_L1_error)
   23229         109 :       __Pyx_GOTREF(__pyx_t_8);
   23230         109 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   23231             :     }
   23232         109 :     __Pyx_DECREF_SET(__pyx_v_matching, __pyx_t_8);
   23233         109 :     __pyx_t_8 = 0;
   23234             : 
   23235             :     /* "scipy/sparse/csgraph/_matching.pyx":520
   23236             :  *                                      i, j)
   23237             :  *         matching = np.asarray(matching)
   23238             :  *         if np.sum(matching != -1) != min(i, j):             # <<<<<<<<<<<<<<
   23239             :  *             raise ValueError('no full matching exists')
   23240             :  *         b = np.asarray(_lapjvsp(biadjacency.indptr,
   23241             :  */
   23242         109 :     __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 520, __pyx_L1_error)
   23243         109 :     __Pyx_GOTREF(__pyx_t_3);
   23244         109 :     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error)
   23245         109 :     __Pyx_GOTREF(__pyx_t_1);
   23246         109 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   23247         109 :     __pyx_t_3 = __Pyx_PyInt_NeObjC(__pyx_v_matching, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 520, __pyx_L1_error)
   23248         109 :     __Pyx_GOTREF(__pyx_t_3);
   23249         109 :     __pyx_t_2 = NULL;
   23250         109 :     __pyx_t_4 = 0;
   23251             :     #if CYTHON_UNPACK_METHODS
   23252         109 :     if (unlikely(PyMethod_Check(__pyx_t_1))) {
   23253           0 :       __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
   23254           0 :       if (likely(__pyx_t_2)) {
   23255           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
   23256           0 :         __Pyx_INCREF(__pyx_t_2);
   23257           0 :         __Pyx_INCREF(function);
   23258           0 :         __Pyx_DECREF_SET(__pyx_t_1, function);
   23259             :         __pyx_t_4 = 1;
   23260             :       }
   23261             :     }
   23262             :     #endif
   23263             :     {
   23264         109 :       PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
   23265         109 :       __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   23266         109 :       __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   23267         109 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   23268         109 :       if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 520, __pyx_L1_error)
   23269         109 :       __Pyx_GOTREF(__pyx_t_8);
   23270         109 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23271             :     }
   23272         109 :     __Pyx_INCREF(__pyx_v_j);
   23273         109 :     __pyx_t_1 = __pyx_v_j;
   23274         109 :     __Pyx_INCREF(__pyx_v_i);
   23275         109 :     __pyx_t_3 = __pyx_v_i;
   23276         109 :     __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 520, __pyx_L1_error)
   23277         109 :     __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 520, __pyx_L1_error)
   23278         109 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   23279         109 :     if (__pyx_t_5) {
   23280           0 :       __Pyx_INCREF(__pyx_t_1);
   23281             :       __pyx_t_2 = __pyx_t_1;
   23282             :     } else {
   23283         109 :       __Pyx_INCREF(__pyx_t_3);
   23284             :       __pyx_t_2 = __pyx_t_3;
   23285             :     }
   23286         109 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   23287         109 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23288         109 :     __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error)
   23289         109 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   23290         109 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23291         109 :     __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 520, __pyx_L1_error)
   23292         109 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23293         109 :     if (unlikely(__pyx_t_5)) {
   23294             : 
   23295             :       /* "scipy/sparse/csgraph/_matching.pyx":521
   23296             :  *         matching = np.asarray(matching)
   23297             :  *         if np.sum(matching != -1) != min(i, j):
   23298             :  *             raise ValueError('no full matching exists')             # <<<<<<<<<<<<<<
   23299             :  *         b = np.asarray(_lapjvsp(biadjacency.indptr,
   23300             :  *                                 biadjacency.indices,
   23301             :  */
   23302          42 :       __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error)
   23303          42 :       __Pyx_GOTREF(__pyx_t_1);
   23304          42 :       __Pyx_Raise(__pyx_t_1, 0, 0, 0);
   23305          42 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23306          42 :       __PYX_ERR(0, 521, __pyx_L1_error)
   23307             : 
   23308             :       /* "scipy/sparse/csgraph/_matching.pyx":520
   23309             :  *                                      i, j)
   23310             :  *         matching = np.asarray(matching)
   23311             :  *         if np.sum(matching != -1) != min(i, j):             # <<<<<<<<<<<<<<
   23312             :  *             raise ValueError('no full matching exists')
   23313             :  *         b = np.asarray(_lapjvsp(biadjacency.indptr,
   23314             :  */
   23315             :     }
   23316             : 
   23317             :     /* "scipy/sparse/csgraph/_matching.pyx":522
   23318             :  *         if np.sum(matching != -1) != min(i, j):
   23319             :  *             raise ValueError('no full matching exists')
   23320             :  *         b = np.asarray(_lapjvsp(biadjacency.indptr,             # <<<<<<<<<<<<<<
   23321             :  *                                 biadjacency.indices,
   23322             :  *                                 biadjacency.data,
   23323             :  */
   23324          67 :     __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 522, __pyx_L1_error)
   23325          67 :     __Pyx_GOTREF(__pyx_t_2);
   23326          67 :     __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 522, __pyx_L1_error)
   23327          67 :     __Pyx_GOTREF(__pyx_t_8);
   23328          67 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23329          67 :     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_indptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 522, __pyx_L1_error)
   23330          67 :     __Pyx_GOTREF(__pyx_t_2);
   23331          67 :     __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 522, __pyx_L1_error)
   23332          67 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23333             : 
   23334             :     /* "scipy/sparse/csgraph/_matching.pyx":523
   23335             :  *             raise ValueError('no full matching exists')
   23336             :  *         b = np.asarray(_lapjvsp(biadjacency.indptr,
   23337             :  *                                 biadjacency.indices,             # <<<<<<<<<<<<<<
   23338             :  *                                 biadjacency.data,
   23339             :  *                                 i, j))
   23340             :  */
   23341          67 :     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error)
   23342          67 :     __Pyx_GOTREF(__pyx_t_2);
   23343          67 :     __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 523, __pyx_L1_error)
   23344          67 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23345             : 
   23346             :     /* "scipy/sparse/csgraph/_matching.pyx":524
   23347             :  *         b = np.asarray(_lapjvsp(biadjacency.indptr,
   23348             :  *                                 biadjacency.indices,
   23349             :  *                                 biadjacency.data,             # <<<<<<<<<<<<<<
   23350             :  *                                 i, j))
   23351             :  *         return (a, b)
   23352             :  */
   23353          67 :     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_biadjacency, __pyx_n_s_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 524, __pyx_L1_error)
   23354          67 :     __Pyx_GOTREF(__pyx_t_2);
   23355          67 :     __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 524, __pyx_L1_error)
   23356          67 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23357             : 
   23358             :     /* "scipy/sparse/csgraph/_matching.pyx":525
   23359             :  *                                 biadjacency.indices,
   23360             :  *                                 biadjacency.data,
   23361             :  *                                 i, j))             # <<<<<<<<<<<<<<
   23362             :  *         return (a, b)
   23363             :  * 
   23364             :  */
   23365          67 :     __pyx_t_14 = __Pyx_PyInt_As_npy_int32(__pyx_v_i); if (unlikely((__pyx_t_14 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 525, __pyx_L1_error)
   23366          67 :     __pyx_t_13 = __Pyx_PyInt_As_npy_int32(__pyx_v_j); if (unlikely((__pyx_t_13 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 525, __pyx_L1_error)
   23367             : 
   23368             :     /* "scipy/sparse/csgraph/_matching.pyx":522
   23369             :  *         if np.sum(matching != -1) != min(i, j):
   23370             :  *             raise ValueError('no full matching exists')
   23371             :  *         b = np.asarray(_lapjvsp(biadjacency.indptr,             # <<<<<<<<<<<<<<
   23372             :  *                                 biadjacency.indices,
   23373             :  *                                 biadjacency.data,
   23374             :  */
   23375          67 :     __pyx_t_15 = __pyx_f_5scipy_6sparse_7csgraph_9_matching__lapjvsp(__pyx_t_18, __pyx_t_16, __pyx_t_17, __pyx_t_14, __pyx_t_13); if (unlikely(!__pyx_t_15.memview)) __PYX_ERR(0, 522, __pyx_L1_error)
   23376          67 :     __PYX_XCLEAR_MEMVIEW(&__pyx_t_18, 1);
   23377          67 :     __pyx_t_18.memview = NULL; __pyx_t_18.data = NULL;
   23378          67 :     __PYX_XCLEAR_MEMVIEW(&__pyx_t_16, 1);
   23379          67 :     __pyx_t_16.memview = NULL; __pyx_t_16.data = NULL;
   23380          67 :     __PYX_XCLEAR_MEMVIEW(&__pyx_t_17, 1);
   23381          67 :     __pyx_t_17.memview = NULL; __pyx_t_17.data = NULL;
   23382          67 :     __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_15, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 522, __pyx_L1_error)
   23383          67 :     __Pyx_GOTREF(__pyx_t_2);
   23384          67 :     __PYX_XCLEAR_MEMVIEW(&__pyx_t_15, 1);
   23385          67 :     __pyx_t_15.memview = NULL; __pyx_t_15.data = NULL;
   23386          67 :     __pyx_t_3 = NULL;
   23387          67 :     __pyx_t_4 = 0;
   23388             :     #if CYTHON_UNPACK_METHODS
   23389          67 :     if (unlikely(PyMethod_Check(__pyx_t_8))) {
   23390           0 :       __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
   23391           0 :       if (likely(__pyx_t_3)) {
   23392           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
   23393           0 :         __Pyx_INCREF(__pyx_t_3);
   23394           0 :         __Pyx_INCREF(function);
   23395           0 :         __Pyx_DECREF_SET(__pyx_t_8, function);
   23396             :         __pyx_t_4 = 1;
   23397             :       }
   23398             :     }
   23399             :     #endif
   23400             :     {
   23401          67 :       PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
   23402          67 :       __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   23403          67 :       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   23404          67 :       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23405          67 :       if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
   23406          67 :       __Pyx_GOTREF(__pyx_t_1);
   23407          67 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   23408             :     }
   23409          67 :     __pyx_v_b = __pyx_t_1;
   23410          67 :     __pyx_t_1 = 0;
   23411             : 
   23412             :     /* "scipy/sparse/csgraph/_matching.pyx":526
   23413             :  *                                 biadjacency.data,
   23414             :  *                                 i, j))
   23415             :  *         return (a, b)             # <<<<<<<<<<<<<<
   23416             :  * 
   23417             :  * 
   23418             :  */
   23419          67 :     __Pyx_XDECREF(__pyx_r);
   23420          67 :     __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error)
   23421          67 :     __Pyx_GOTREF(__pyx_t_1);
   23422          67 :     __Pyx_INCREF(__pyx_v_a);
   23423          67 :     __Pyx_GIVEREF(__pyx_v_a);
   23424          67 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_a)) __PYX_ERR(0, 526, __pyx_L1_error);
   23425          67 :     __Pyx_INCREF(__pyx_v_b);
   23426          67 :     __Pyx_GIVEREF(__pyx_v_b);
   23427          67 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_b)) __PYX_ERR(0, 526, __pyx_L1_error);
   23428          67 :     __pyx_r = __pyx_t_1;
   23429          67 :     __pyx_t_1 = 0;
   23430          67 :     goto __pyx_L0;
   23431             :   }
   23432             : 
   23433             :   /* "scipy/sparse/csgraph/_matching.pyx":290
   23434             :  * 
   23435             :  * 
   23436             :  * def min_weight_full_bipartite_matching(biadjacency, maximize=False):             # <<<<<<<<<<<<<<
   23437             :  *     r"""
   23438             :  *     min_weight_full_bipartite_matching(biadjacency, maximize=False)
   23439             :  */
   23440             : 
   23441             :   /* function exit code */
   23442          43 :   __pyx_L1_error:;
   23443          43 :   __Pyx_XDECREF(__pyx_t_1);
   23444          43 :   __Pyx_XDECREF(__pyx_t_2);
   23445          43 :   __Pyx_XDECREF(__pyx_t_3);
   23446          43 :   __Pyx_XDECREF(__pyx_t_7);
   23447          43 :   __Pyx_XDECREF(__pyx_t_8);
   23448          43 :   __Pyx_XDECREF(__pyx_t_10);
   23449          43 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_11, 1);
   23450          43 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_12, 1);
   23451          43 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_15, 1);
   23452          43 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_16, 1);
   23453          43 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_17, 1);
   23454          43 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_18, 1);
   23455          43 :   __Pyx_AddTraceback("scipy.sparse.csgraph._matching.min_weight_full_bipartite_matching", __pyx_clineno, __pyx_lineno, __pyx_filename);
   23456          43 :   __pyx_r = NULL;
   23457         111 :   __pyx_L0:;
   23458         111 :   __Pyx_XDECREF(__pyx_v_i);
   23459         111 :   __Pyx_XDECREF(__pyx_v_j);
   23460         111 :   __Pyx_XDECREF(__pyx_v_a);
   23461         111 :   __Pyx_XDECREF(__pyx_v_biadj_indices);
   23462         111 :   __Pyx_XDECREF(__pyx_v_biadj_indptr);
   23463         111 :   __Pyx_XDECREF(__pyx_v_biadjacency_t);
   23464         111 :   __Pyx_XDECREF(__pyx_v_matching);
   23465         111 :   __Pyx_XDECREF(__pyx_v__);
   23466         111 :   __Pyx_XDECREF(__pyx_v_b);
   23467         111 :   __Pyx_XDECREF(__pyx_v_indices);
   23468         111 :   __Pyx_XDECREF(__pyx_v_biadjacency);
   23469         111 :   __Pyx_XGIVEREF(__pyx_r);
   23470         111 :   __Pyx_RefNannyFinishContext();
   23471         111 :   return __pyx_r;
   23472             : }
   23473             : 
   23474             : /* "scipy/sparse/csgraph/_matching.pyx":536
   23475             :  * @cython.boundscheck(False)
   23476             :  * @cython.wraparound(False)
   23477             :  * cdef ITYPE_t[:] _lapjvsp(ITYPE_t[:] first,             # <<<<<<<<<<<<<<
   23478             :  *                          ITYPE_t[:] kk,
   23479             :  *                          DTYPE_t[:] cc,
   23480             :  */
   23481             : 
   23482          68 : static __Pyx_memviewslice __pyx_f_5scipy_6sparse_7csgraph_9_matching__lapjvsp(__Pyx_memviewslice __pyx_v_first, __Pyx_memviewslice __pyx_v_kk, __Pyx_memviewslice __pyx_v_cc, __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t const __pyx_v_nr, __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t const __pyx_v_nc) {
   23483          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_l0;
   23484          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_jp;
   23485          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_t;
   23486          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_i;
   23487          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_lp;
   23488          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_j1;
   23489          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_tp;
   23490          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_j0p;
   23491          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_j1p;
   23492          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_l0p;
   23493          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_h;
   23494          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_i0;
   23495          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_td1;
   23496          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t __pyx_v_min_diff;
   23497          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t __pyx_v_v0;
   23498          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t __pyx_v_vj;
   23499          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t __pyx_v_dj;
   23500          68 :   __Pyx_memviewslice __pyx_v_v = { 0, 0, { 0 }, { 0 }, { 0 } };
   23501          68 :   __Pyx_memviewslice __pyx_v_x = { 0, 0, { 0 }, { 0 }, { 0 } };
   23502          68 :   __Pyx_memviewslice __pyx_v_y = { 0, 0, { 0 }, { 0 }, { 0 } };
   23503          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_j;
   23504          68 :   __Pyx_memviewslice __pyx_v_u = { 0, 0, { 0 }, { 0 }, { 0 } };
   23505          68 :   __Pyx_memviewslice __pyx_v_d = { 0, 0, { 0 }, { 0 }, { 0 } };
   23506          68 :   __Pyx_memviewslice __pyx_v_ok = { 0, 0, { 0 }, { 0 }, { 0 } };
   23507          68 :   __Pyx_memviewslice __pyx_v_xinv = { 0, 0, { 0 }, { 0 }, { 0 } };
   23508          68 :   __Pyx_memviewslice __pyx_v_free = { 0, 0, { 0 }, { 0 }, { 0 } };
   23509          68 :   __Pyx_memviewslice __pyx_v_todo = { 0, 0, { 0 }, { 0 }, { 0 } };
   23510          68 :   __Pyx_memviewslice __pyx_v_lab = { 0, 0, { 0 }, { 0 }, { 0 } };
   23511          68 :   CYTHON_UNUSED long __pyx_v__;
   23512          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_l;
   23513          68 :   __Pyx_memviewslice __pyx_r = { 0, 0, { 0 }, { 0 }, { 0 } };
   23514             :   __Pyx_RefNannyDeclarations
   23515          68 :   PyObject *__pyx_t_1 = NULL;
   23516          68 :   PyObject *__pyx_t_2 = NULL;
   23517          68 :   PyObject *__pyx_t_3 = NULL;
   23518          68 :   PyObject *__pyx_t_4 = NULL;
   23519          68 :   __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
   23520          68 :   __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
   23521          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_7;
   23522          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_8;
   23523          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_9;
   23524          68 :   Py_ssize_t __pyx_t_10;
   23525          68 :   __Pyx_memviewslice __pyx_t_11 = { 0, 0, { 0 }, { 0 }, { 0 } };
   23526          68 :   int __pyx_t_12;
   23527          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_13;
   23528          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_14;
   23529          68 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_15;
   23530          68 :   Py_ssize_t __pyx_t_16;
   23531          68 :   Py_ssize_t __pyx_t_17;
   23532          68 :   long __pyx_t_18;
   23533          68 :   int __pyx_lineno = 0;
   23534          68 :   const char *__pyx_filename = NULL;
   23535          68 :   int __pyx_clineno = 0;
   23536          68 :   __Pyx_RefNannySetupContext("_lapjvsp", 1);
   23537             : 
   23538             :   /* "scipy/sparse/csgraph/_matching.pyx":588
   23539             :  *     cdef ITYPE_t l0, jp, t, i, lp, j1, tp, j0p, j1p, l0p, h, i0, td1
   23540             :  *     cdef DTYPE_t min_diff, v0, vj, dj
   23541             :  *     cdef DTYPE_t[:] v = np.zeros(nc, dtype=DTYPE)             # <<<<<<<<<<<<<<
   23542             :  *     cdef ITYPE_t[:] x = np.empty(nr, dtype=ITYPE)
   23543             :  *     for i in range(nr):
   23544             :  */
   23545          68 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
   23546          68 :   __Pyx_GOTREF(__pyx_t_1);
   23547          68 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
   23548          68 :   __Pyx_GOTREF(__pyx_t_2);
   23549          68 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23550          68 :   __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
   23551          68 :   __Pyx_GOTREF(__pyx_t_1);
   23552          68 :   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L1_error)
   23553          68 :   __Pyx_GOTREF(__pyx_t_3);
   23554          68 :   __Pyx_GIVEREF(__pyx_t_1);
   23555          68 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error);
   23556          68 :   __pyx_t_1 = 0;
   23557          68 :   __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
   23558          68 :   __Pyx_GOTREF(__pyx_t_1);
   23559          68 :   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 588, __pyx_L1_error)
   23560          68 :   __Pyx_GOTREF(__pyx_t_4);
   23561          68 :   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 588, __pyx_L1_error)
   23562          68 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   23563          68 :   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 588, __pyx_L1_error)
   23564          68 :   __Pyx_GOTREF(__pyx_t_4);
   23565          68 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23566          68 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   23567          68 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23568          68 :   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 588, __pyx_L1_error)
   23569          68 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   23570          68 :   __pyx_v_v = __pyx_t_5;
   23571          68 :   __pyx_t_5.memview = NULL;
   23572          68 :   __pyx_t_5.data = NULL;
   23573             : 
   23574             :   /* "scipy/sparse/csgraph/_matching.pyx":589
   23575             :  *     cdef DTYPE_t min_diff, v0, vj, dj
   23576             :  *     cdef DTYPE_t[:] v = np.zeros(nc, dtype=DTYPE)
   23577             :  *     cdef ITYPE_t[:] x = np.empty(nr, dtype=ITYPE)             # <<<<<<<<<<<<<<
   23578             :  *     for i in range(nr):
   23579             :  *         x[i] = -1
   23580             :  */
   23581          68 :   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 589, __pyx_L1_error)
   23582          68 :   __Pyx_GOTREF(__pyx_t_4);
   23583          68 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
   23584          68 :   __Pyx_GOTREF(__pyx_t_1);
   23585          68 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   23586          68 :   __pyx_t_4 = __Pyx_PyInt_From_npy_int32(__pyx_v_nr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 589, __pyx_L1_error)
   23587          68 :   __Pyx_GOTREF(__pyx_t_4);
   23588          68 :   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error)
   23589          68 :   __Pyx_GOTREF(__pyx_t_3);
   23590          68 :   __Pyx_GIVEREF(__pyx_t_4);
   23591          68 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 589, __pyx_L1_error);
   23592          68 :   __pyx_t_4 = 0;
   23593          68 :   __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 589, __pyx_L1_error)
   23594          68 :   __Pyx_GOTREF(__pyx_t_4);
   23595          68 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ITYPE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
   23596          68 :   __Pyx_GOTREF(__pyx_t_2);
   23597          68 :   if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 589, __pyx_L1_error)
   23598          68 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23599          68 :   __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
   23600          68 :   __Pyx_GOTREF(__pyx_t_2);
   23601          68 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23602          68 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   23603          68 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   23604          68 :   __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 589, __pyx_L1_error)
   23605          68 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23606          68 :   __pyx_v_x = __pyx_t_6;
   23607          68 :   __pyx_t_6.memview = NULL;
   23608          68 :   __pyx_t_6.data = NULL;
   23609             : 
   23610             :   /* "scipy/sparse/csgraph/_matching.pyx":590
   23611             :  *     cdef DTYPE_t[:] v = np.zeros(nc, dtype=DTYPE)
   23612             :  *     cdef ITYPE_t[:] x = np.empty(nr, dtype=ITYPE)
   23613             :  *     for i in range(nr):             # <<<<<<<<<<<<<<
   23614             :  *         x[i] = -1
   23615             :  *     cdef ITYPE_t[:] y = np.empty(nc, dtype=ITYPE)
   23616             :  */
   23617          68 :   __pyx_t_7 = __pyx_v_nr;
   23618          68 :   __pyx_t_8 = __pyx_t_7;
   23619        6470 :   for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
   23620        6402 :     __pyx_v_i = __pyx_t_9;
   23621             : 
   23622             :     /* "scipy/sparse/csgraph/_matching.pyx":591
   23623             :  *     cdef ITYPE_t[:] x = np.empty(nr, dtype=ITYPE)
   23624             :  *     for i in range(nr):
   23625             :  *         x[i] = -1             # <<<<<<<<<<<<<<
   23626             :  *     cdef ITYPE_t[:] y = np.empty(nc, dtype=ITYPE)
   23627             :  *     for j in range(nc):
   23628             :  */
   23629        6402 :     __pyx_t_10 = __pyx_v_i;
   23630        6402 :     *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_10 * __pyx_v_x.strides[0]) )) = -1;
   23631             :   }
   23632             : 
   23633             :   /* "scipy/sparse/csgraph/_matching.pyx":592
   23634             :  *     for i in range(nr):
   23635             :  *         x[i] = -1
   23636             :  *     cdef ITYPE_t[:] y = np.empty(nc, dtype=ITYPE)             # <<<<<<<<<<<<<<
   23637             :  *     for j in range(nc):
   23638             :  *         y[j] = -1
   23639             :  */
   23640          68 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 592, __pyx_L1_error)
   23641          68 :   __Pyx_GOTREF(__pyx_t_2);
   23642          68 :   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 592, __pyx_L1_error)
   23643          68 :   __Pyx_GOTREF(__pyx_t_4);
   23644          68 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23645          68 :   __pyx_t_2 = __Pyx_PyInt_From_npy_int32(__pyx_v_nc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 592, __pyx_L1_error)
   23646          68 :   __Pyx_GOTREF(__pyx_t_2);
   23647          68 :   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 592, __pyx_L1_error)
   23648          68 :   __Pyx_GOTREF(__pyx_t_3);
   23649          68 :   __Pyx_GIVEREF(__pyx_t_2);
   23650          68 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 592, __pyx_L1_error);
   23651          68 :   __pyx_t_2 = 0;
   23652          68 :   __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 592, __pyx_L1_error)
   23653          68 :   __Pyx_GOTREF(__pyx_t_2);
   23654          68 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ITYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 592, __pyx_L1_error)
   23655          68 :   __Pyx_GOTREF(__pyx_t_1);
   23656          68 :   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 592, __pyx_L1_error)
   23657          68 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23658          68 :   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 592, __pyx_L1_error)
   23659          68 :   __Pyx_GOTREF(__pyx_t_1);
   23660          68 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   23661          68 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   23662          68 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23663          68 :   __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 592, __pyx_L1_error)
   23664          68 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23665          68 :   __pyx_v_y = __pyx_t_6;
   23666          68 :   __pyx_t_6.memview = NULL;
   23667          68 :   __pyx_t_6.data = NULL;
   23668             : 
   23669             :   /* "scipy/sparse/csgraph/_matching.pyx":593
   23670             :  *         x[i] = -1
   23671             :  *     cdef ITYPE_t[:] y = np.empty(nc, dtype=ITYPE)
   23672             :  *     for j in range(nc):             # <<<<<<<<<<<<<<
   23673             :  *         y[j] = -1
   23674             :  *     cdef DTYPE_t[:] u = np.zeros(nr, dtype=DTYPE)
   23675             :  */
   23676          68 :   __pyx_t_7 = __pyx_v_nc;
   23677          68 :   __pyx_t_8 = __pyx_t_7;
   23678        6475 :   for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
   23679        6407 :     __pyx_v_j = __pyx_t_9;
   23680             : 
   23681             :     /* "scipy/sparse/csgraph/_matching.pyx":594
   23682             :  *     cdef ITYPE_t[:] y = np.empty(nc, dtype=ITYPE)
   23683             :  *     for j in range(nc):
   23684             :  *         y[j] = -1             # <<<<<<<<<<<<<<
   23685             :  *     cdef DTYPE_t[:] u = np.zeros(nr, dtype=DTYPE)
   23686             :  *     cdef DTYPE_t[:] d = np.zeros(nc, dtype=DTYPE)
   23687             :  */
   23688        6407 :     __pyx_t_10 = __pyx_v_j;
   23689        6407 :     *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_10 * __pyx_v_y.strides[0]) )) = -1;
   23690             :   }
   23691             : 
   23692             :   /* "scipy/sparse/csgraph/_matching.pyx":595
   23693             :  *     for j in range(nc):
   23694             :  *         y[j] = -1
   23695             :  *     cdef DTYPE_t[:] u = np.zeros(nr, dtype=DTYPE)             # <<<<<<<<<<<<<<
   23696             :  *     cdef DTYPE_t[:] d = np.zeros(nc, dtype=DTYPE)
   23697             :  *     cdef BTYPE_t[:] ok = np.zeros(nc, dtype=BTYPE)
   23698             :  */
   23699          68 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error)
   23700          68 :   __Pyx_GOTREF(__pyx_t_1);
   23701          68 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 595, __pyx_L1_error)
   23702          68 :   __Pyx_GOTREF(__pyx_t_2);
   23703          68 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23704          68 :   __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_nr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error)
   23705          68 :   __Pyx_GOTREF(__pyx_t_1);
   23706          68 :   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 595, __pyx_L1_error)
   23707          68 :   __Pyx_GOTREF(__pyx_t_3);
   23708          68 :   __Pyx_GIVEREF(__pyx_t_1);
   23709          68 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error);
   23710          68 :   __pyx_t_1 = 0;
   23711          68 :   __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error)
   23712          68 :   __Pyx_GOTREF(__pyx_t_1);
   23713          68 :   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 595, __pyx_L1_error)
   23714          68 :   __Pyx_GOTREF(__pyx_t_4);
   23715          68 :   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 595, __pyx_L1_error)
   23716          68 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   23717          68 :   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 595, __pyx_L1_error)
   23718          68 :   __Pyx_GOTREF(__pyx_t_4);
   23719          68 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23720          68 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   23721          68 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23722          68 :   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 595, __pyx_L1_error)
   23723          68 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   23724          68 :   __pyx_v_u = __pyx_t_5;
   23725          68 :   __pyx_t_5.memview = NULL;
   23726          68 :   __pyx_t_5.data = NULL;
   23727             : 
   23728             :   /* "scipy/sparse/csgraph/_matching.pyx":596
   23729             :  *         y[j] = -1
   23730             :  *     cdef DTYPE_t[:] u = np.zeros(nr, dtype=DTYPE)
   23731             :  *     cdef DTYPE_t[:] d = np.zeros(nc, dtype=DTYPE)             # <<<<<<<<<<<<<<
   23732             :  *     cdef BTYPE_t[:] ok = np.zeros(nc, dtype=BTYPE)
   23733             :  *     cdef BTYPE_t[:] xinv = np.zeros(nr, dtype=BTYPE)
   23734             :  */
   23735          68 :   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 596, __pyx_L1_error)
   23736          68 :   __Pyx_GOTREF(__pyx_t_4);
   23737          68 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error)
   23738          68 :   __Pyx_GOTREF(__pyx_t_1);
   23739          68 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   23740          68 :   __pyx_t_4 = __Pyx_PyInt_From_npy_int32(__pyx_v_nc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 596, __pyx_L1_error)
   23741          68 :   __Pyx_GOTREF(__pyx_t_4);
   23742          68 :   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 596, __pyx_L1_error)
   23743          68 :   __Pyx_GOTREF(__pyx_t_3);
   23744          68 :   __Pyx_GIVEREF(__pyx_t_4);
   23745          68 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 596, __pyx_L1_error);
   23746          68 :   __pyx_t_4 = 0;
   23747          68 :   __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 596, __pyx_L1_error)
   23748          68 :   __Pyx_GOTREF(__pyx_t_4);
   23749          68 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DTYPE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 596, __pyx_L1_error)
   23750          68 :   __Pyx_GOTREF(__pyx_t_2);
   23751          68 :   if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 596, __pyx_L1_error)
   23752          68 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23753          68 :   __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 596, __pyx_L1_error)
   23754          68 :   __Pyx_GOTREF(__pyx_t_2);
   23755          68 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23756          68 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   23757          68 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   23758          68 :   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 596, __pyx_L1_error)
   23759          68 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23760          68 :   __pyx_v_d = __pyx_t_5;
   23761          68 :   __pyx_t_5.memview = NULL;
   23762          68 :   __pyx_t_5.data = NULL;
   23763             : 
   23764             :   /* "scipy/sparse/csgraph/_matching.pyx":597
   23765             :  *     cdef DTYPE_t[:] u = np.zeros(nr, dtype=DTYPE)
   23766             :  *     cdef DTYPE_t[:] d = np.zeros(nc, dtype=DTYPE)
   23767             :  *     cdef BTYPE_t[:] ok = np.zeros(nc, dtype=BTYPE)             # <<<<<<<<<<<<<<
   23768             :  *     cdef BTYPE_t[:] xinv = np.zeros(nr, dtype=BTYPE)
   23769             :  *     cdef ITYPE_t[:] free = np.empty(nr, dtype=ITYPE)
   23770             :  */
   23771          68 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error)
   23772          68 :   __Pyx_GOTREF(__pyx_t_2);
   23773          68 :   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 597, __pyx_L1_error)
   23774          68 :   __Pyx_GOTREF(__pyx_t_4);
   23775          68 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23776          68 :   __pyx_t_2 = __Pyx_PyInt_From_npy_int32(__pyx_v_nc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error)
   23777          68 :   __Pyx_GOTREF(__pyx_t_2);
   23778          68 :   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 597, __pyx_L1_error)
   23779          68 :   __Pyx_GOTREF(__pyx_t_3);
   23780          68 :   __Pyx_GIVEREF(__pyx_t_2);
   23781          68 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error);
   23782          68 :   __pyx_t_2 = 0;
   23783          68 :   __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error)
   23784          68 :   __Pyx_GOTREF(__pyx_t_2);
   23785          68 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error)
   23786          68 :   __Pyx_GOTREF(__pyx_t_1);
   23787          68 :   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 597, __pyx_L1_error)
   23788          68 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23789          68 :   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error)
   23790          68 :   __Pyx_GOTREF(__pyx_t_1);
   23791          68 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   23792          68 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   23793          68 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23794          68 :   __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_BTYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 597, __pyx_L1_error)
   23795          68 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23796          68 :   __pyx_v_ok = __pyx_t_11;
   23797          68 :   __pyx_t_11.memview = NULL;
   23798          68 :   __pyx_t_11.data = NULL;
   23799             : 
   23800             :   /* "scipy/sparse/csgraph/_matching.pyx":598
   23801             :  *     cdef DTYPE_t[:] d = np.zeros(nc, dtype=DTYPE)
   23802             :  *     cdef BTYPE_t[:] ok = np.zeros(nc, dtype=BTYPE)
   23803             :  *     cdef BTYPE_t[:] xinv = np.zeros(nr, dtype=BTYPE)             # <<<<<<<<<<<<<<
   23804             :  *     cdef ITYPE_t[:] free = np.empty(nr, dtype=ITYPE)
   23805             :  *     for i in range(nr):
   23806             :  */
   23807          68 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error)
   23808          68 :   __Pyx_GOTREF(__pyx_t_1);
   23809          68 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error)
   23810          68 :   __Pyx_GOTREF(__pyx_t_2);
   23811          68 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23812          68 :   __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_nr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error)
   23813          68 :   __Pyx_GOTREF(__pyx_t_1);
   23814          68 :   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 598, __pyx_L1_error)
   23815          68 :   __Pyx_GOTREF(__pyx_t_3);
   23816          68 :   __Pyx_GIVEREF(__pyx_t_1);
   23817          68 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error);
   23818          68 :   __pyx_t_1 = 0;
   23819          68 :   __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error)
   23820          68 :   __Pyx_GOTREF(__pyx_t_1);
   23821          68 :   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_BTYPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 598, __pyx_L1_error)
   23822          68 :   __Pyx_GOTREF(__pyx_t_4);
   23823          68 :   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 598, __pyx_L1_error)
   23824          68 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   23825          68 :   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 598, __pyx_L1_error)
   23826          68 :   __Pyx_GOTREF(__pyx_t_4);
   23827          68 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23828          68 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   23829          68 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23830          68 :   __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_BTYPE_t(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 598, __pyx_L1_error)
   23831          68 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   23832          68 :   __pyx_v_xinv = __pyx_t_11;
   23833          68 :   __pyx_t_11.memview = NULL;
   23834          68 :   __pyx_t_11.data = NULL;
   23835             : 
   23836             :   /* "scipy/sparse/csgraph/_matching.pyx":599
   23837             :  *     cdef BTYPE_t[:] ok = np.zeros(nc, dtype=BTYPE)
   23838             :  *     cdef BTYPE_t[:] xinv = np.zeros(nr, dtype=BTYPE)
   23839             :  *     cdef ITYPE_t[:] free = np.empty(nr, dtype=ITYPE)             # <<<<<<<<<<<<<<
   23840             :  *     for i in range(nr):
   23841             :  *         free[i] = -1
   23842             :  */
   23843          68 :   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 599, __pyx_L1_error)
   23844          68 :   __Pyx_GOTREF(__pyx_t_4);
   23845          68 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L1_error)
   23846          68 :   __Pyx_GOTREF(__pyx_t_1);
   23847          68 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   23848          68 :   __pyx_t_4 = __Pyx_PyInt_From_npy_int32(__pyx_v_nr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 599, __pyx_L1_error)
   23849          68 :   __Pyx_GOTREF(__pyx_t_4);
   23850          68 :   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 599, __pyx_L1_error)
   23851          68 :   __Pyx_GOTREF(__pyx_t_3);
   23852          68 :   __Pyx_GIVEREF(__pyx_t_4);
   23853          68 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 599, __pyx_L1_error);
   23854          68 :   __pyx_t_4 = 0;
   23855          68 :   __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 599, __pyx_L1_error)
   23856          68 :   __Pyx_GOTREF(__pyx_t_4);
   23857          68 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ITYPE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 599, __pyx_L1_error)
   23858          68 :   __Pyx_GOTREF(__pyx_t_2);
   23859          68 :   if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 599, __pyx_L1_error)
   23860          68 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23861          68 :   __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 599, __pyx_L1_error)
   23862          68 :   __Pyx_GOTREF(__pyx_t_2);
   23863          68 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23864          68 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   23865          68 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   23866          68 :   __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 599, __pyx_L1_error)
   23867          68 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23868          68 :   __pyx_v_free = __pyx_t_6;
   23869          68 :   __pyx_t_6.memview = NULL;
   23870          68 :   __pyx_t_6.data = NULL;
   23871             : 
   23872             :   /* "scipy/sparse/csgraph/_matching.pyx":600
   23873             :  *     cdef BTYPE_t[:] xinv = np.zeros(nr, dtype=BTYPE)
   23874             :  *     cdef ITYPE_t[:] free = np.empty(nr, dtype=ITYPE)
   23875             :  *     for i in range(nr):             # <<<<<<<<<<<<<<
   23876             :  *         free[i] = -1
   23877             :  *     cdef ITYPE_t[:] todo = np.empty(nc, dtype=ITYPE)
   23878             :  */
   23879          68 :   __pyx_t_7 = __pyx_v_nr;
   23880          68 :   __pyx_t_8 = __pyx_t_7;
   23881        6470 :   for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
   23882        6402 :     __pyx_v_i = __pyx_t_9;
   23883             : 
   23884             :     /* "scipy/sparse/csgraph/_matching.pyx":601
   23885             :  *     cdef ITYPE_t[:] free = np.empty(nr, dtype=ITYPE)
   23886             :  *     for i in range(nr):
   23887             :  *         free[i] = -1             # <<<<<<<<<<<<<<
   23888             :  *     cdef ITYPE_t[:] todo = np.empty(nc, dtype=ITYPE)
   23889             :  *     for j in range(nc):
   23890             :  */
   23891        6402 :     __pyx_t_10 = __pyx_v_i;
   23892        6402 :     *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_free.data + __pyx_t_10 * __pyx_v_free.strides[0]) )) = -1;
   23893             :   }
   23894             : 
   23895             :   /* "scipy/sparse/csgraph/_matching.pyx":602
   23896             :  *     for i in range(nr):
   23897             :  *         free[i] = -1
   23898             :  *     cdef ITYPE_t[:] todo = np.empty(nc, dtype=ITYPE)             # <<<<<<<<<<<<<<
   23899             :  *     for j in range(nc):
   23900             :  *         todo[j] = -1
   23901             :  */
   23902          68 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 602, __pyx_L1_error)
   23903          68 :   __Pyx_GOTREF(__pyx_t_2);
   23904          68 :   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 602, __pyx_L1_error)
   23905          68 :   __Pyx_GOTREF(__pyx_t_4);
   23906          68 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23907          68 :   __pyx_t_2 = __Pyx_PyInt_From_npy_int32(__pyx_v_nc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 602, __pyx_L1_error)
   23908          68 :   __Pyx_GOTREF(__pyx_t_2);
   23909          68 :   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 602, __pyx_L1_error)
   23910          68 :   __Pyx_GOTREF(__pyx_t_3);
   23911          68 :   __Pyx_GIVEREF(__pyx_t_2);
   23912          68 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 602, __pyx_L1_error);
   23913          68 :   __pyx_t_2 = 0;
   23914          68 :   __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 602, __pyx_L1_error)
   23915          68 :   __Pyx_GOTREF(__pyx_t_2);
   23916          68 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ITYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error)
   23917          68 :   __Pyx_GOTREF(__pyx_t_1);
   23918          68 :   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 602, __pyx_L1_error)
   23919          68 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23920          68 :   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error)
   23921          68 :   __Pyx_GOTREF(__pyx_t_1);
   23922          68 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   23923          68 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   23924          68 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23925          68 :   __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 602, __pyx_L1_error)
   23926          68 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23927          68 :   __pyx_v_todo = __pyx_t_6;
   23928          68 :   __pyx_t_6.memview = NULL;
   23929          68 :   __pyx_t_6.data = NULL;
   23930             : 
   23931             :   /* "scipy/sparse/csgraph/_matching.pyx":603
   23932             :  *         free[i] = -1
   23933             :  *     cdef ITYPE_t[:] todo = np.empty(nc, dtype=ITYPE)
   23934             :  *     for j in range(nc):             # <<<<<<<<<<<<<<
   23935             :  *         todo[j] = -1
   23936             :  *     cdef ITYPE_t[:] lab = np.zeros(nc, dtype=ITYPE)
   23937             :  */
   23938          68 :   __pyx_t_7 = __pyx_v_nc;
   23939          68 :   __pyx_t_8 = __pyx_t_7;
   23940        6475 :   for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
   23941        6407 :     __pyx_v_j = __pyx_t_9;
   23942             : 
   23943             :     /* "scipy/sparse/csgraph/_matching.pyx":604
   23944             :  *     cdef ITYPE_t[:] todo = np.empty(nc, dtype=ITYPE)
   23945             :  *     for j in range(nc):
   23946             :  *         todo[j] = -1             # <<<<<<<<<<<<<<
   23947             :  *     cdef ITYPE_t[:] lab = np.zeros(nc, dtype=ITYPE)
   23948             :  * 
   23949             :  */
   23950        6407 :     __pyx_t_10 = __pyx_v_j;
   23951        6407 :     *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_todo.data + __pyx_t_10 * __pyx_v_todo.strides[0]) )) = -1;
   23952             :   }
   23953             : 
   23954             :   /* "scipy/sparse/csgraph/_matching.pyx":605
   23955             :  *     for j in range(nc):
   23956             :  *         todo[j] = -1
   23957             :  *     cdef ITYPE_t[:] lab = np.zeros(nc, dtype=ITYPE)             # <<<<<<<<<<<<<<
   23958             :  * 
   23959             :  *     # We skip the initialization entirely in the non-square case and instead
   23960             :  */
   23961          68 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error)
   23962          68 :   __Pyx_GOTREF(__pyx_t_1);
   23963          68 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 605, __pyx_L1_error)
   23964          68 :   __Pyx_GOTREF(__pyx_t_2);
   23965          68 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23966          68 :   __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error)
   23967          68 :   __Pyx_GOTREF(__pyx_t_1);
   23968          68 :   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 605, __pyx_L1_error)
   23969          68 :   __Pyx_GOTREF(__pyx_t_3);
   23970          68 :   __Pyx_GIVEREF(__pyx_t_1);
   23971          68 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error);
   23972          68 :   __pyx_t_1 = 0;
   23973          68 :   __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error)
   23974          68 :   __Pyx_GOTREF(__pyx_t_1);
   23975          68 :   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ITYPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 605, __pyx_L1_error)
   23976          68 :   __Pyx_GOTREF(__pyx_t_4);
   23977          68 :   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 605, __pyx_L1_error)
   23978          68 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   23979          68 :   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 605, __pyx_L1_error)
   23980          68 :   __Pyx_GOTREF(__pyx_t_4);
   23981          68 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23982          68 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   23983          68 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23984          68 :   __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 605, __pyx_L1_error)
   23985          68 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   23986          68 :   __pyx_v_lab = __pyx_t_6;
   23987          68 :   __pyx_t_6.memview = NULL;
   23988          68 :   __pyx_t_6.data = NULL;
   23989             : 
   23990             :   /* "scipy/sparse/csgraph/_matching.pyx":609
   23991             :  *     # We skip the initialization entirely in the non-square case and instead
   23992             :  *     # fill all of `free` explicitly.
   23993             :  *     if nr == nc:             # <<<<<<<<<<<<<<
   23994             :  *         # From here, proceed from line 55 in the original Pascal code, LAPJVS.P
   23995             :  *         for jp in range(nc):
   23996             :  */
   23997          68 :   __pyx_t_12 = (__pyx_v_nr == __pyx_v_nc);
   23998          68 :   if (__pyx_t_12) {
   23999             : 
   24000             :     /* "scipy/sparse/csgraph/_matching.pyx":611
   24001             :  *     if nr == nc:
   24002             :  *         # From here, proceed from line 55 in the original Pascal code, LAPJVS.P
   24003             :  *         for jp in range(nc):             # <<<<<<<<<<<<<<
   24004             :  *             v[jp] = INFINITY
   24005             :  *         for i in range(nr):
   24006             :  */
   24007        6468 :     __pyx_t_7 = __pyx_v_nc;
   24008        6468 :     __pyx_t_8 = __pyx_t_7;
   24009        6468 :     for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
   24010        6402 :       __pyx_v_jp = __pyx_t_9;
   24011             : 
   24012             :       /* "scipy/sparse/csgraph/_matching.pyx":612
   24013             :  *         # From here, proceed from line 55 in the original Pascal code, LAPJVS.P
   24014             :  *         for jp in range(nc):
   24015             :  *             v[jp] = INFINITY             # <<<<<<<<<<<<<<
   24016             :  *         for i in range(nr):
   24017             :  *             for t in range(first[i], first[i + 1]):
   24018             :  */
   24019        6402 :       __pyx_t_10 = __pyx_v_jp;
   24020        6402 :       *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_10 * __pyx_v_v.strides[0]) )) = INFINITY;
   24021             :     }
   24022             : 
   24023             :     /* "scipy/sparse/csgraph/_matching.pyx":613
   24024             :  *         for jp in range(nc):
   24025             :  *             v[jp] = INFINITY
   24026             :  *         for i in range(nr):             # <<<<<<<<<<<<<<
   24027             :  *             for t in range(first[i], first[i + 1]):
   24028             :  *                 jp = kk[t]
   24029             :  */
   24030        6468 :     __pyx_t_7 = __pyx_v_nr;
   24031        6468 :     __pyx_t_8 = __pyx_t_7;
   24032        6468 :     for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
   24033        6402 :       __pyx_v_i = __pyx_t_9;
   24034             : 
   24035             :       /* "scipy/sparse/csgraph/_matching.pyx":614
   24036             :  *             v[jp] = INFINITY
   24037             :  *         for i in range(nr):
   24038             :  *             for t in range(first[i], first[i + 1]):             # <<<<<<<<<<<<<<
   24039             :  *                 jp = kk[t]
   24040             :  *                 if cc[t] < v[jp]:
   24041             :  */
   24042        6402 :       __pyx_t_10 = (__pyx_v_i + 1);
   24043        6402 :       __pyx_t_13 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_first.data + __pyx_t_10 * __pyx_v_first.strides[0]) )));
   24044        6402 :       __pyx_t_10 = __pyx_v_i;
   24045        6402 :       __pyx_t_14 = __pyx_t_13;
   24046       44804 :       for (__pyx_t_15 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_first.data + __pyx_t_10 * __pyx_v_first.strides[0]) ))); __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
   24047       38402 :         __pyx_v_t = __pyx_t_15;
   24048             : 
   24049             :         /* "scipy/sparse/csgraph/_matching.pyx":615
   24050             :  *         for i in range(nr):
   24051             :  *             for t in range(first[i], first[i + 1]):
   24052             :  *                 jp = kk[t]             # <<<<<<<<<<<<<<
   24053             :  *                 if cc[t] < v[jp]:
   24054             :  *                     v[jp] = cc[t]
   24055             :  */
   24056       38402 :         __pyx_t_16 = __pyx_v_t;
   24057       38402 :         __pyx_v_jp = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_kk.data + __pyx_t_16 * __pyx_v_kk.strides[0]) )));
   24058             : 
   24059             :         /* "scipy/sparse/csgraph/_matching.pyx":616
   24060             :  *             for t in range(first[i], first[i + 1]):
   24061             :  *                 jp = kk[t]
   24062             :  *                 if cc[t] < v[jp]:             # <<<<<<<<<<<<<<
   24063             :  *                     v[jp] = cc[t]
   24064             :  *                     y[jp] = i
   24065             :  */
   24066       38402 :         __pyx_t_16 = __pyx_v_t;
   24067       38402 :         __pyx_t_17 = __pyx_v_jp;
   24068       38402 :         __pyx_t_12 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_cc.data + __pyx_t_16 * __pyx_v_cc.strides[0]) ))) < (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_17 * __pyx_v_v.strides[0]) ))));
   24069       38402 :         if (__pyx_t_12) {
   24070             : 
   24071             :           /* "scipy/sparse/csgraph/_matching.pyx":617
   24072             :  *                 jp = kk[t]
   24073             :  *                 if cc[t] < v[jp]:
   24074             :  *                     v[jp] = cc[t]             # <<<<<<<<<<<<<<
   24075             :  *                     y[jp] = i
   24076             :  *         for jp in range(nc - 1, -1, -1):
   24077             :  */
   24078       15067 :           __pyx_t_17 = __pyx_v_t;
   24079       15067 :           __pyx_t_16 = __pyx_v_jp;
   24080       15067 :           *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_16 * __pyx_v_v.strides[0]) )) = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_cc.data + __pyx_t_17 * __pyx_v_cc.strides[0]) )));
   24081             : 
   24082             :           /* "scipy/sparse/csgraph/_matching.pyx":618
   24083             :  *                 if cc[t] < v[jp]:
   24084             :  *                     v[jp] = cc[t]
   24085             :  *                     y[jp] = i             # <<<<<<<<<<<<<<
   24086             :  *         for jp in range(nc - 1, -1, -1):
   24087             :  *             i = y[jp]
   24088             :  */
   24089       15067 :           __pyx_t_17 = __pyx_v_jp;
   24090       15067 :           *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_17 * __pyx_v_y.strides[0]) )) = __pyx_v_i;
   24091             : 
   24092             :           /* "scipy/sparse/csgraph/_matching.pyx":616
   24093             :  *             for t in range(first[i], first[i + 1]):
   24094             :  *                 jp = kk[t]
   24095             :  *                 if cc[t] < v[jp]:             # <<<<<<<<<<<<<<
   24096             :  *                     v[jp] = cc[t]
   24097             :  *                     y[jp] = i
   24098             :  */
   24099             :         }
   24100             :       }
   24101             :     }
   24102             : 
   24103             :     /* "scipy/sparse/csgraph/_matching.pyx":619
   24104             :  *                     v[jp] = cc[t]
   24105             :  *                     y[jp] = i
   24106             :  *         for jp in range(nc - 1, -1, -1):             # <<<<<<<<<<<<<<
   24107             :  *             i = y[jp]
   24108             :  *             # If no row has been matched with column jp at this point, that
   24109             :  */
   24110        6468 :     for (__pyx_t_7 = (__pyx_v_nc - 1); __pyx_t_7 > -1; __pyx_t_7-=1) {
   24111        6402 :       __pyx_v_jp = __pyx_t_7;
   24112             : 
   24113             :       /* "scipy/sparse/csgraph/_matching.pyx":620
   24114             :  *                     y[jp] = i
   24115             :  *         for jp in range(nc - 1, -1, -1):
   24116             :  *             i = y[jp]             # <<<<<<<<<<<<<<
   24117             :  *             # If no row has been matched with column jp at this point, that
   24118             :  *             # can only mean that the column has no incident rows at all.
   24119             :  */
   24120        6402 :       __pyx_t_10 = __pyx_v_jp;
   24121        6402 :       __pyx_v_i = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_10 * __pyx_v_y.strides[0]) )));
   24122             : 
   24123             :       /* "scipy/sparse/csgraph/_matching.pyx":623
   24124             :  *             # If no row has been matched with column jp at this point, that
   24125             :  *             # can only mean that the column has no incident rows at all.
   24126             :  *             if i == -1:             # <<<<<<<<<<<<<<
   24127             :  *                 raise ValueError('no full matching exists')
   24128             :  *             if x[i] == -1:
   24129             :  */
   24130        6402 :       __pyx_t_12 = (__pyx_v_i == -1L);
   24131        6402 :       if (unlikely(__pyx_t_12)) {
   24132             : 
   24133             :         /* "scipy/sparse/csgraph/_matching.pyx":624
   24134             :  *             # can only mean that the column has no incident rows at all.
   24135             :  *             if i == -1:
   24136             :  *                 raise ValueError('no full matching exists')             # <<<<<<<<<<<<<<
   24137             :  *             if x[i] == -1:
   24138             :  *                 x[i] = jp
   24139             :  */
   24140           0 :         __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 624, __pyx_L1_error)
   24141           0 :         __Pyx_GOTREF(__pyx_t_4);
   24142           0 :         __Pyx_Raise(__pyx_t_4, 0, 0, 0);
   24143           0 :         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   24144           0 :         __PYX_ERR(0, 624, __pyx_L1_error)
   24145             : 
   24146             :         /* "scipy/sparse/csgraph/_matching.pyx":623
   24147             :  *             # If no row has been matched with column jp at this point, that
   24148             :  *             # can only mean that the column has no incident rows at all.
   24149             :  *             if i == -1:             # <<<<<<<<<<<<<<
   24150             :  *                 raise ValueError('no full matching exists')
   24151             :  *             if x[i] == -1:
   24152             :  */
   24153             :       }
   24154             : 
   24155             :       /* "scipy/sparse/csgraph/_matching.pyx":625
   24156             :  *             if i == -1:
   24157             :  *                 raise ValueError('no full matching exists')
   24158             :  *             if x[i] == -1:             # <<<<<<<<<<<<<<
   24159             :  *                 x[i] = jp
   24160             :  *             else:
   24161             :  */
   24162        6402 :       __pyx_t_10 = __pyx_v_i;
   24163        6402 :       __pyx_t_12 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_10 * __pyx_v_x.strides[0]) ))) == -1L);
   24164        6402 :       if (__pyx_t_12) {
   24165             : 
   24166             :         /* "scipy/sparse/csgraph/_matching.pyx":626
   24167             :  *                 raise ValueError('no full matching exists')
   24168             :  *             if x[i] == -1:
   24169             :  *                 x[i] = jp             # <<<<<<<<<<<<<<
   24170             :  *             else:
   24171             :  *                 y[jp] = -1
   24172             :  */
   24173        4053 :         __pyx_t_10 = __pyx_v_i;
   24174        4053 :         *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_10 * __pyx_v_x.strides[0]) )) = __pyx_v_jp;
   24175             : 
   24176             :         /* "scipy/sparse/csgraph/_matching.pyx":625
   24177             :  *             if i == -1:
   24178             :  *                 raise ValueError('no full matching exists')
   24179             :  *             if x[i] == -1:             # <<<<<<<<<<<<<<
   24180             :  *                 x[i] = jp
   24181             :  *             else:
   24182             :  */
   24183        4053 :         goto __pyx_L22;
   24184             :       }
   24185             : 
   24186             :       /* "scipy/sparse/csgraph/_matching.pyx":628
   24187             :  *                 x[i] = jp
   24188             :  *             else:
   24189             :  *                 y[jp] = -1             # <<<<<<<<<<<<<<
   24190             :  *                 # Here, the original Pascal code simply inverts the sign of
   24191             :  *                 # x[i]; as that doesn't play too well with zero-indexing, we
   24192             :  */
   24193             :       /*else*/ {
   24194        2349 :         __pyx_t_10 = __pyx_v_jp;
   24195        2349 :         *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_10 * __pyx_v_y.strides[0]) )) = -1;
   24196             : 
   24197             :         /* "scipy/sparse/csgraph/_matching.pyx":632
   24198             :  *                 # x[i]; as that doesn't play too well with zero-indexing, we
   24199             :  *                 # explicitly keep track of uniqueness instead.
   24200             :  *                 xinv[i] = 1             # <<<<<<<<<<<<<<
   24201             :  *         lp = 0
   24202             :  *         for i in range(nr):
   24203             :  */
   24204        2349 :         __pyx_t_10 = __pyx_v_i;
   24205        2349 :         *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_BTYPE_t *) ( /* dim=0 */ (__pyx_v_xinv.data + __pyx_t_10 * __pyx_v_xinv.strides[0]) )) = 1;
   24206             :       }
   24207        6402 :       __pyx_L22:;
   24208             :     }
   24209             : 
   24210             :     /* "scipy/sparse/csgraph/_matching.pyx":633
   24211             :  *                 # explicitly keep track of uniqueness instead.
   24212             :  *                 xinv[i] = 1
   24213             :  *         lp = 0             # <<<<<<<<<<<<<<
   24214             :  *         for i in range(nr):
   24215             :  *             if xinv[i] == 1:
   24216             :  */
   24217             :     __pyx_v_lp = 0;
   24218             : 
   24219             :     /* "scipy/sparse/csgraph/_matching.pyx":634
   24220             :  *                 xinv[i] = 1
   24221             :  *         lp = 0
   24222             :  *         for i in range(nr):             # <<<<<<<<<<<<<<
   24223             :  *             if xinv[i] == 1:
   24224             :  *                 continue
   24225             :  */
   24226        6468 :     __pyx_t_7 = __pyx_v_nr;
   24227        6468 :     __pyx_t_8 = __pyx_t_7;
   24228        6468 :     for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
   24229        6402 :       __pyx_v_i = __pyx_t_9;
   24230             : 
   24231             :       /* "scipy/sparse/csgraph/_matching.pyx":635
   24232             :  *         lp = 0
   24233             :  *         for i in range(nr):
   24234             :  *             if xinv[i] == 1:             # <<<<<<<<<<<<<<
   24235             :  *                 continue
   24236             :  *             if x[i] != -1:
   24237             :  */
   24238        6402 :       __pyx_t_10 = __pyx_v_i;
   24239        6402 :       __pyx_t_12 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_BTYPE_t *) ( /* dim=0 */ (__pyx_v_xinv.data + __pyx_t_10 * __pyx_v_xinv.strides[0]) ))) == 1);
   24240        6402 :       if (__pyx_t_12) {
   24241             : 
   24242             :         /* "scipy/sparse/csgraph/_matching.pyx":636
   24243             :  *         for i in range(nr):
   24244             :  *             if xinv[i] == 1:
   24245             :  *                 continue             # <<<<<<<<<<<<<<
   24246             :  *             if x[i] != -1:
   24247             :  *                 min_diff = INFINITY
   24248             :  */
   24249        1680 :         goto __pyx_L23_continue;
   24250             : 
   24251             :         /* "scipy/sparse/csgraph/_matching.pyx":635
   24252             :  *         lp = 0
   24253             :  *         for i in range(nr):
   24254             :  *             if xinv[i] == 1:             # <<<<<<<<<<<<<<
   24255             :  *                 continue
   24256             :  *             if x[i] != -1:
   24257             :  */
   24258             :       }
   24259             : 
   24260             :       /* "scipy/sparse/csgraph/_matching.pyx":637
   24261             :  *             if xinv[i] == 1:
   24262             :  *                 continue
   24263             :  *             if x[i] != -1:             # <<<<<<<<<<<<<<
   24264             :  *                 min_diff = INFINITY
   24265             :  *                 j1 = x[i]
   24266             :  */
   24267        4722 :       __pyx_t_10 = __pyx_v_i;
   24268        4722 :       __pyx_t_12 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_10 * __pyx_v_x.strides[0]) ))) != -1L);
   24269        4722 :       if (__pyx_t_12) {
   24270             : 
   24271             :         /* "scipy/sparse/csgraph/_matching.pyx":638
   24272             :  *                 continue
   24273             :  *             if x[i] != -1:
   24274             :  *                 min_diff = INFINITY             # <<<<<<<<<<<<<<
   24275             :  *                 j1 = x[i]
   24276             :  *                 for t in range(first[i], first[i + 1]):
   24277             :  */
   24278        2373 :         __pyx_v_min_diff = INFINITY;
   24279             : 
   24280             :         /* "scipy/sparse/csgraph/_matching.pyx":639
   24281             :  *             if x[i] != -1:
   24282             :  *                 min_diff = INFINITY
   24283             :  *                 j1 = x[i]             # <<<<<<<<<<<<<<
   24284             :  *                 for t in range(first[i], first[i + 1]):
   24285             :  *                     jp = kk[t]
   24286             :  */
   24287        2373 :         __pyx_t_10 = __pyx_v_i;
   24288        2373 :         __pyx_v_j1 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_10 * __pyx_v_x.strides[0]) )));
   24289             : 
   24290             :         /* "scipy/sparse/csgraph/_matching.pyx":640
   24291             :  *                 min_diff = INFINITY
   24292             :  *                 j1 = x[i]
   24293             :  *                 for t in range(first[i], first[i + 1]):             # <<<<<<<<<<<<<<
   24294             :  *                     jp = kk[t]
   24295             :  *                     if jp != j1:
   24296             :  */
   24297        2373 :         __pyx_t_10 = (__pyx_v_i + 1);
   24298        2373 :         __pyx_t_13 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_first.data + __pyx_t_10 * __pyx_v_first.strides[0]) )));
   24299        2373 :         __pyx_t_10 = __pyx_v_i;
   24300        2373 :         __pyx_t_14 = __pyx_t_13;
   24301       16694 :         for (__pyx_t_15 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_first.data + __pyx_t_10 * __pyx_v_first.strides[0]) ))); __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
   24302       14321 :           __pyx_v_t = __pyx_t_15;
   24303             : 
   24304             :           /* "scipy/sparse/csgraph/_matching.pyx":641
   24305             :  *                 j1 = x[i]
   24306             :  *                 for t in range(first[i], first[i + 1]):
   24307             :  *                     jp = kk[t]             # <<<<<<<<<<<<<<
   24308             :  *                     if jp != j1:
   24309             :  *                         if cc[t] - v[jp] < min_diff:
   24310             :  */
   24311       14321 :           __pyx_t_17 = __pyx_v_t;
   24312       14321 :           __pyx_v_jp = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_kk.data + __pyx_t_17 * __pyx_v_kk.strides[0]) )));
   24313             : 
   24314             :           /* "scipy/sparse/csgraph/_matching.pyx":642
   24315             :  *                 for t in range(first[i], first[i + 1]):
   24316             :  *                     jp = kk[t]
   24317             :  *                     if jp != j1:             # <<<<<<<<<<<<<<
   24318             :  *                         if cc[t] - v[jp] < min_diff:
   24319             :  *                             min_diff = cc[t] - v[jp]
   24320             :  */
   24321       14321 :           __pyx_t_12 = (__pyx_v_jp != __pyx_v_j1);
   24322       14321 :           if (__pyx_t_12) {
   24323             : 
   24324             :             /* "scipy/sparse/csgraph/_matching.pyx":643
   24325             :  *                     jp = kk[t]
   24326             :  *                     if jp != j1:
   24327             :  *                         if cc[t] - v[jp] < min_diff:             # <<<<<<<<<<<<<<
   24328             :  *                             min_diff = cc[t] - v[jp]
   24329             :  *                 u[i] = min_diff
   24330             :  */
   24331       11948 :             __pyx_t_17 = __pyx_v_t;
   24332       11948 :             __pyx_t_16 = __pyx_v_jp;
   24333       11948 :             __pyx_t_12 = (((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_cc.data + __pyx_t_17 * __pyx_v_cc.strides[0]) ))) - (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_16 * __pyx_v_v.strides[0]) )))) < __pyx_v_min_diff);
   24334       11948 :             if (__pyx_t_12) {
   24335             : 
   24336             :               /* "scipy/sparse/csgraph/_matching.pyx":644
   24337             :  *                     if jp != j1:
   24338             :  *                         if cc[t] - v[jp] < min_diff:
   24339             :  *                             min_diff = cc[t] - v[jp]             # <<<<<<<<<<<<<<
   24340             :  *                 u[i] = min_diff
   24341             :  *                 tp = first[i]
   24342             :  */
   24343       14321 :               __pyx_t_16 = __pyx_v_t;
   24344       14321 :               __pyx_t_17 = __pyx_v_jp;
   24345       14321 :               __pyx_v_min_diff = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_cc.data + __pyx_t_16 * __pyx_v_cc.strides[0]) ))) - (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_17 * __pyx_v_v.strides[0]) ))));
   24346             : 
   24347             :               /* "scipy/sparse/csgraph/_matching.pyx":643
   24348             :  *                     jp = kk[t]
   24349             :  *                     if jp != j1:
   24350             :  *                         if cc[t] - v[jp] < min_diff:             # <<<<<<<<<<<<<<
   24351             :  *                             min_diff = cc[t] - v[jp]
   24352             :  *                 u[i] = min_diff
   24353             :  */
   24354             :             }
   24355             : 
   24356             :             /* "scipy/sparse/csgraph/_matching.pyx":642
   24357             :  *                 for t in range(first[i], first[i + 1]):
   24358             :  *                     jp = kk[t]
   24359             :  *                     if jp != j1:             # <<<<<<<<<<<<<<
   24360             :  *                         if cc[t] - v[jp] < min_diff:
   24361             :  *                             min_diff = cc[t] - v[jp]
   24362             :  */
   24363             :           }
   24364             :         }
   24365             : 
   24366             :         /* "scipy/sparse/csgraph/_matching.pyx":645
   24367             :  *                         if cc[t] - v[jp] < min_diff:
   24368             :  *                             min_diff = cc[t] - v[jp]
   24369             :  *                 u[i] = min_diff             # <<<<<<<<<<<<<<
   24370             :  *                 tp = first[i]
   24371             :  *                 while kk[tp] != j1:
   24372             :  */
   24373        2373 :         __pyx_t_10 = __pyx_v_i;
   24374        2373 :         *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_u.data + __pyx_t_10 * __pyx_v_u.strides[0]) )) = __pyx_v_min_diff;
   24375             : 
   24376             :         /* "scipy/sparse/csgraph/_matching.pyx":646
   24377             :  *                             min_diff = cc[t] - v[jp]
   24378             :  *                 u[i] = min_diff
   24379             :  *                 tp = first[i]             # <<<<<<<<<<<<<<
   24380             :  *                 while kk[tp] != j1:
   24381             :  *                     tp += 1
   24382             :  */
   24383        2373 :         __pyx_t_10 = __pyx_v_i;
   24384        2373 :         __pyx_v_tp = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_first.data + __pyx_t_10 * __pyx_v_first.strides[0]) )));
   24385             : 
   24386             :         /* "scipy/sparse/csgraph/_matching.pyx":647
   24387             :  *                 u[i] = min_diff
   24388             :  *                 tp = first[i]
   24389             :  *                 while kk[tp] != j1:             # <<<<<<<<<<<<<<
   24390             :  *                     tp += 1
   24391             :  *                 v[j1] = cc[tp] - min_diff
   24392             :  */
   24393       14365 :         while (1) {
   24394        8369 :           __pyx_t_10 = __pyx_v_tp;
   24395        8369 :           __pyx_t_12 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_kk.data + __pyx_t_10 * __pyx_v_kk.strides[0]) ))) != __pyx_v_j1);
   24396        8369 :           if (!__pyx_t_12) break;
   24397             : 
   24398             :           /* "scipy/sparse/csgraph/_matching.pyx":648
   24399             :  *                 tp = first[i]
   24400             :  *                 while kk[tp] != j1:
   24401             :  *                     tp += 1             # <<<<<<<<<<<<<<
   24402             :  *                 v[j1] = cc[tp] - min_diff
   24403             :  *             else:
   24404             :  */
   24405        5996 :           __pyx_v_tp = (__pyx_v_tp + 1);
   24406             :         }
   24407             : 
   24408             :         /* "scipy/sparse/csgraph/_matching.pyx":649
   24409             :  *                 while kk[tp] != j1:
   24410             :  *                     tp += 1
   24411             :  *                 v[j1] = cc[tp] - min_diff             # <<<<<<<<<<<<<<
   24412             :  *             else:
   24413             :  *                 # The following two lines are swapped in the Pascal code: This
   24414             :  */
   24415        2373 :         __pyx_t_10 = __pyx_v_tp;
   24416        2373 :         __pyx_t_17 = __pyx_v_j1;
   24417        2373 :         *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_17 * __pyx_v_v.strides[0]) )) = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_cc.data + __pyx_t_10 * __pyx_v_cc.strides[0]) ))) - __pyx_v_min_diff);
   24418             : 
   24419             :         /* "scipy/sparse/csgraph/_matching.pyx":637
   24420             :  *             if xinv[i] == 1:
   24421             :  *                 continue
   24422             :  *             if x[i] != -1:             # <<<<<<<<<<<<<<
   24423             :  *                 min_diff = INFINITY
   24424             :  *                 j1 = x[i]
   24425             :  */
   24426        2373 :         goto __pyx_L26;
   24427             :       }
   24428             : 
   24429             :       /* "scipy/sparse/csgraph/_matching.pyx":656
   24430             :  *                 # correspond to the 0 initialization in Pascal (as we recall
   24431             :  *                 # that all indices are shifted by one).
   24432             :  *                 free[lp] = i             # <<<<<<<<<<<<<<
   24433             :  *                 lp += 1
   24434             :  *         for _ in range(2):
   24435             :  */
   24436             :       /*else*/ {
   24437        2349 :         __pyx_t_10 = __pyx_v_lp;
   24438        2349 :         *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_free.data + __pyx_t_10 * __pyx_v_free.strides[0]) )) = __pyx_v_i;
   24439             : 
   24440             :         /* "scipy/sparse/csgraph/_matching.pyx":657
   24441             :  *                 # that all indices are shifted by one).
   24442             :  *                 free[lp] = i
   24443             :  *                 lp += 1             # <<<<<<<<<<<<<<
   24444             :  *         for _ in range(2):
   24445             :  *             h = 0
   24446             :  */
   24447        2349 :         __pyx_v_lp = (__pyx_v_lp + 1);
   24448             :       }
   24449        6402 :       __pyx_L26:;
   24450        6402 :       __pyx_L23_continue:;
   24451             :     }
   24452             : 
   24453             :     /* "scipy/sparse/csgraph/_matching.pyx":658
   24454             :  *                 free[lp] = i
   24455             :  *                 lp += 1
   24456             :  *         for _ in range(2):             # <<<<<<<<<<<<<<
   24457             :  *             h = 0
   24458             :  *             l0p = lp
   24459             :  */
   24460         198 :     for (__pyx_t_18 = 0; __pyx_t_18 < 2; __pyx_t_18+=1) {
   24461             :       __pyx_v__ = __pyx_t_18;
   24462             : 
   24463             :       /* "scipy/sparse/csgraph/_matching.pyx":659
   24464             :  *                 lp += 1
   24465             :  *         for _ in range(2):
   24466             :  *             h = 0             # <<<<<<<<<<<<<<
   24467             :  *             l0p = lp
   24468             :  *             lp = 0
   24469             :  */
   24470             :       __pyx_v_h = 0;
   24471             : 
   24472             :       /* "scipy/sparse/csgraph/_matching.pyx":660
   24473             :  *         for _ in range(2):
   24474             :  *             h = 0
   24475             :  *             l0p = lp             # <<<<<<<<<<<<<<
   24476             :  *             lp = 0
   24477             :  *             while h < l0p:
   24478             :  */
   24479             :       __pyx_v_l0p = __pyx_v_lp;
   24480             : 
   24481             :       /* "scipy/sparse/csgraph/_matching.pyx":661
   24482             :  *             h = 0
   24483             :  *             l0p = lp
   24484             :  *             lp = 0             # <<<<<<<<<<<<<<
   24485             :  *             while h < l0p:
   24486             :  *                 i = free[h]
   24487             :  */
   24488             :       __pyx_v_lp = 0;
   24489             : 
   24490             :       /* "scipy/sparse/csgraph/_matching.pyx":662
   24491             :  *             l0p = lp
   24492             :  *             lp = 0
   24493             :  *             while h < l0p:             # <<<<<<<<<<<<<<
   24494             :  *                 i = free[h]
   24495             :  *                 h += 1
   24496             :  */
   24497       11502 :       while (1) {
   24498       11502 :         __pyx_t_12 = (__pyx_v_h < __pyx_v_l0p);
   24499       11502 :         if (!__pyx_t_12) break;
   24500             : 
   24501             :         /* "scipy/sparse/csgraph/_matching.pyx":663
   24502             :  *             lp = 0
   24503             :  *             while h < l0p:
   24504             :  *                 i = free[h]             # <<<<<<<<<<<<<<
   24505             :  *                 h += 1
   24506             :  *                 # Note: In the original Pascal code, the indices of the lowest
   24507             :  */
   24508       11370 :         __pyx_t_10 = __pyx_v_h;
   24509       11370 :         __pyx_v_i = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_free.data + __pyx_t_10 * __pyx_v_free.strides[0]) )));
   24510             : 
   24511             :         /* "scipy/sparse/csgraph/_matching.pyx":664
   24512             :  *             while h < l0p:
   24513             :  *                 i = free[h]
   24514             :  *                 h += 1             # <<<<<<<<<<<<<<
   24515             :  *                 # Note: In the original Pascal code, the indices of the lowest
   24516             :  *                 # and second-lowest reduced costs are never reset. This can
   24517             :  */
   24518       11370 :         __pyx_v_h = (__pyx_v_h + 1);
   24519             : 
   24520             :         /* "scipy/sparse/csgraph/_matching.pyx":669
   24521             :  *                 # cause issues for infeasible problems; see
   24522             :  *                 # https://stackoverflow.com/q/62875232/5085211
   24523             :  *                 j0p = -1             # <<<<<<<<<<<<<<
   24524             :  *                 j1p = -1
   24525             :  *                 v0 = INFINITY
   24526             :  */
   24527       11370 :         __pyx_v_j0p = -1;
   24528             : 
   24529             :         /* "scipy/sparse/csgraph/_matching.pyx":670
   24530             :  *                 # https://stackoverflow.com/q/62875232/5085211
   24531             :  *                 j0p = -1
   24532             :  *                 j1p = -1             # <<<<<<<<<<<<<<
   24533             :  *                 v0 = INFINITY
   24534             :  *                 vj = INFINITY
   24535             :  */
   24536       11370 :         __pyx_v_j1p = -1;
   24537             : 
   24538             :         /* "scipy/sparse/csgraph/_matching.pyx":671
   24539             :  *                 j0p = -1
   24540             :  *                 j1p = -1
   24541             :  *                 v0 = INFINITY             # <<<<<<<<<<<<<<
   24542             :  *                 vj = INFINITY
   24543             :  *                 for t in range(first[i], first[i + 1]):
   24544             :  */
   24545       11370 :         __pyx_v_v0 = INFINITY;
   24546             : 
   24547             :         /* "scipy/sparse/csgraph/_matching.pyx":672
   24548             :  *                 j1p = -1
   24549             :  *                 v0 = INFINITY
   24550             :  *                 vj = INFINITY             # <<<<<<<<<<<<<<
   24551             :  *                 for t in range(first[i], first[i + 1]):
   24552             :  *                     jp = kk[t]
   24553             :  */
   24554       11370 :         __pyx_v_vj = INFINITY;
   24555             : 
   24556             :         /* "scipy/sparse/csgraph/_matching.pyx":673
   24557             :  *                 v0 = INFINITY
   24558             :  *                 vj = INFINITY
   24559             :  *                 for t in range(first[i], first[i + 1]):             # <<<<<<<<<<<<<<
   24560             :  *                     jp = kk[t]
   24561             :  *                     dj = cc[t] - v[jp]
   24562             :  */
   24563       11370 :         __pyx_t_10 = (__pyx_v_i + 1);
   24564       11370 :         __pyx_t_7 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_first.data + __pyx_t_10 * __pyx_v_first.strides[0]) )));
   24565       11370 :         __pyx_t_10 = __pyx_v_i;
   24566       11370 :         __pyx_t_8 = __pyx_t_7;
   24567       80641 :         for (__pyx_t_9 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_first.data + __pyx_t_10 * __pyx_v_first.strides[0]) ))); __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
   24568       69271 :           __pyx_v_t = __pyx_t_9;
   24569             : 
   24570             :           /* "scipy/sparse/csgraph/_matching.pyx":674
   24571             :  *                 vj = INFINITY
   24572             :  *                 for t in range(first[i], first[i + 1]):
   24573             :  *                     jp = kk[t]             # <<<<<<<<<<<<<<
   24574             :  *                     dj = cc[t] - v[jp]
   24575             :  *                     if dj < vj:
   24576             :  */
   24577       69271 :           __pyx_t_17 = __pyx_v_t;
   24578       69271 :           __pyx_v_jp = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_kk.data + __pyx_t_17 * __pyx_v_kk.strides[0]) )));
   24579             : 
   24580             :           /* "scipy/sparse/csgraph/_matching.pyx":675
   24581             :  *                 for t in range(first[i], first[i + 1]):
   24582             :  *                     jp = kk[t]
   24583             :  *                     dj = cc[t] - v[jp]             # <<<<<<<<<<<<<<
   24584             :  *                     if dj < vj:
   24585             :  *                         if dj >= v0:
   24586             :  */
   24587       69271 :           __pyx_t_17 = __pyx_v_t;
   24588       69271 :           __pyx_t_16 = __pyx_v_jp;
   24589       69271 :           __pyx_v_dj = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_cc.data + __pyx_t_17 * __pyx_v_cc.strides[0]) ))) - (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_16 * __pyx_v_v.strides[0]) ))));
   24590             : 
   24591             :           /* "scipy/sparse/csgraph/_matching.pyx":676
   24592             :  *                     jp = kk[t]
   24593             :  *                     dj = cc[t] - v[jp]
   24594             :  *                     if dj < vj:             # <<<<<<<<<<<<<<
   24595             :  *                         if dj >= v0:
   24596             :  *                             vj = dj
   24597             :  */
   24598       69271 :           __pyx_t_12 = (__pyx_v_dj < __pyx_v_vj);
   24599       69271 :           if (__pyx_t_12) {
   24600             : 
   24601             :             /* "scipy/sparse/csgraph/_matching.pyx":677
   24602             :  *                     dj = cc[t] - v[jp]
   24603             :  *                     if dj < vj:
   24604             :  *                         if dj >= v0:             # <<<<<<<<<<<<<<
   24605             :  *                             vj = dj
   24606             :  *                             j1p = jp
   24607             :  */
   24608       42878 :             __pyx_t_12 = (__pyx_v_dj >= __pyx_v_v0);
   24609       42878 :             if (__pyx_t_12) {
   24610             : 
   24611             :               /* "scipy/sparse/csgraph/_matching.pyx":678
   24612             :  *                     if dj < vj:
   24613             :  *                         if dj >= v0:
   24614             :  *                             vj = dj             # <<<<<<<<<<<<<<
   24615             :  *                             j1p = jp
   24616             :  *                         else:
   24617             :  */
   24618       16328 :               __pyx_v_vj = __pyx_v_dj;
   24619             : 
   24620             :               /* "scipy/sparse/csgraph/_matching.pyx":679
   24621             :  *                         if dj >= v0:
   24622             :  *                             vj = dj
   24623             :  *                             j1p = jp             # <<<<<<<<<<<<<<
   24624             :  *                         else:
   24625             :  *                             vj = v0
   24626             :  */
   24627       16328 :               __pyx_v_j1p = __pyx_v_jp;
   24628             : 
   24629             :               /* "scipy/sparse/csgraph/_matching.pyx":677
   24630             :  *                     dj = cc[t] - v[jp]
   24631             :  *                     if dj < vj:
   24632             :  *                         if dj >= v0:             # <<<<<<<<<<<<<<
   24633             :  *                             vj = dj
   24634             :  *                             j1p = jp
   24635             :  */
   24636       16328 :               goto __pyx_L40;
   24637             :             }
   24638             : 
   24639             :             /* "scipy/sparse/csgraph/_matching.pyx":681
   24640             :  *                             j1p = jp
   24641             :  *                         else:
   24642             :  *                             vj = v0             # <<<<<<<<<<<<<<
   24643             :  *                             v0 = dj
   24644             :  *                             j1p = j0p
   24645             :  */
   24646             :             /*else*/ {
   24647             :               __pyx_v_vj = __pyx_v_v0;
   24648             : 
   24649             :               /* "scipy/sparse/csgraph/_matching.pyx":682
   24650             :  *                         else:
   24651             :  *                             vj = v0
   24652             :  *                             v0 = dj             # <<<<<<<<<<<<<<
   24653             :  *                             j1p = j0p
   24654             :  *                             j0p = jp
   24655             :  */
   24656             :               __pyx_v_v0 = __pyx_v_dj;
   24657             : 
   24658             :               /* "scipy/sparse/csgraph/_matching.pyx":683
   24659             :  *                             vj = v0
   24660             :  *                             v0 = dj
   24661             :  *                             j1p = j0p             # <<<<<<<<<<<<<<
   24662             :  *                             j0p = jp
   24663             :  *                 # If the index of the column with the largest reduced cost has
   24664             :  */
   24665             :               __pyx_v_j1p = __pyx_v_j0p;
   24666             : 
   24667             :               /* "scipy/sparse/csgraph/_matching.pyx":684
   24668             :  *                             v0 = dj
   24669             :  *                             j1p = j0p
   24670             :  *                             j0p = jp             # <<<<<<<<<<<<<<
   24671             :  *                 # If the index of the column with the largest reduced cost has
   24672             :  *                 # not been set, no assignment is possible for this row.
   24673             :  */
   24674             :               __pyx_v_j0p = __pyx_v_jp;
   24675             :             }
   24676       69271 :             __pyx_L40:;
   24677             : 
   24678             :             /* "scipy/sparse/csgraph/_matching.pyx":676
   24679             :  *                     jp = kk[t]
   24680             :  *                     dj = cc[t] - v[jp]
   24681             :  *                     if dj < vj:             # <<<<<<<<<<<<<<
   24682             :  *                         if dj >= v0:
   24683             :  *                             vj = dj
   24684             :  */
   24685             :           }
   24686             :         }
   24687             : 
   24688             :         /* "scipy/sparse/csgraph/_matching.pyx":687
   24689             :  *                 # If the index of the column with the largest reduced cost has
   24690             :  *                 # not been set, no assignment is possible for this row.
   24691             :  *                 if j0p < 0:             # <<<<<<<<<<<<<<
   24692             :  *                     raise ValueError('no full matching exists')
   24693             :  *                 i0 = y[j0p]
   24694             :  */
   24695       11370 :         __pyx_t_12 = (__pyx_v_j0p < 0);
   24696       11370 :         if (unlikely(__pyx_t_12)) {
   24697             : 
   24698             :           /* "scipy/sparse/csgraph/_matching.pyx":688
   24699             :  *                 # not been set, no assignment is possible for this row.
   24700             :  *                 if j0p < 0:
   24701             :  *                     raise ValueError('no full matching exists')             # <<<<<<<<<<<<<<
   24702             :  *                 i0 = y[j0p]
   24703             :  *                 u[i] = vj
   24704             :  */
   24705           0 :           __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 688, __pyx_L1_error)
   24706           0 :           __Pyx_GOTREF(__pyx_t_4);
   24707           0 :           __Pyx_Raise(__pyx_t_4, 0, 0, 0);
   24708           0 :           __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   24709           0 :           __PYX_ERR(0, 688, __pyx_L1_error)
   24710             : 
   24711             :           /* "scipy/sparse/csgraph/_matching.pyx":687
   24712             :  *                 # If the index of the column with the largest reduced cost has
   24713             :  *                 # not been set, no assignment is possible for this row.
   24714             :  *                 if j0p < 0:             # <<<<<<<<<<<<<<
   24715             :  *                     raise ValueError('no full matching exists')
   24716             :  *                 i0 = y[j0p]
   24717             :  */
   24718             :         }
   24719             : 
   24720             :         /* "scipy/sparse/csgraph/_matching.pyx":689
   24721             :  *                 if j0p < 0:
   24722             :  *                     raise ValueError('no full matching exists')
   24723             :  *                 i0 = y[j0p]             # <<<<<<<<<<<<<<
   24724             :  *                 u[i] = vj
   24725             :  *                 if v0 < vj:
   24726             :  */
   24727       11370 :         __pyx_t_10 = __pyx_v_j0p;
   24728       11370 :         __pyx_v_i0 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_10 * __pyx_v_y.strides[0]) )));
   24729             : 
   24730             :         /* "scipy/sparse/csgraph/_matching.pyx":690
   24731             :  *                     raise ValueError('no full matching exists')
   24732             :  *                 i0 = y[j0p]
   24733             :  *                 u[i] = vj             # <<<<<<<<<<<<<<
   24734             :  *                 if v0 < vj:
   24735             :  *                     v[j0p] += v0 - vj
   24736             :  */
   24737       11370 :         __pyx_t_10 = __pyx_v_i;
   24738       11370 :         *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_u.data + __pyx_t_10 * __pyx_v_u.strides[0]) )) = __pyx_v_vj;
   24739             : 
   24740             :         /* "scipy/sparse/csgraph/_matching.pyx":691
   24741             :  *                 i0 = y[j0p]
   24742             :  *                 u[i] = vj
   24743             :  *                 if v0 < vj:             # <<<<<<<<<<<<<<
   24744             :  *                     v[j0p] += v0 - vj
   24745             :  *                 elif i0 != -1:
   24746             :  */
   24747       11370 :         __pyx_t_12 = (__pyx_v_v0 < __pyx_v_vj);
   24748       11370 :         if (__pyx_t_12) {
   24749             : 
   24750             :           /* "scipy/sparse/csgraph/_matching.pyx":692
   24751             :  *                 u[i] = vj
   24752             :  *                 if v0 < vj:
   24753             :  *                     v[j0p] += v0 - vj             # <<<<<<<<<<<<<<
   24754             :  *                 elif i0 != -1:
   24755             :  *                     j0p = j1p
   24756             :  */
   24757       10639 :           __pyx_t_10 = __pyx_v_j0p;
   24758       10639 :           *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_10 * __pyx_v_v.strides[0]) )) += (__pyx_v_v0 - __pyx_v_vj);
   24759             : 
   24760             :           /* "scipy/sparse/csgraph/_matching.pyx":691
   24761             :  *                 i0 = y[j0p]
   24762             :  *                 u[i] = vj
   24763             :  *                 if v0 < vj:             # <<<<<<<<<<<<<<
   24764             :  *                     v[j0p] += v0 - vj
   24765             :  *                 elif i0 != -1:
   24766             :  */
   24767       10639 :           goto __pyx_L42;
   24768             :         }
   24769             : 
   24770             :         /* "scipy/sparse/csgraph/_matching.pyx":693
   24771             :  *                 if v0 < vj:
   24772             :  *                     v[j0p] += v0 - vj
   24773             :  *                 elif i0 != -1:             # <<<<<<<<<<<<<<
   24774             :  *                     j0p = j1p
   24775             :  *                     i0 = y[j0p]
   24776             :  */
   24777         731 :         __pyx_t_12 = (__pyx_v_i0 != -1L);
   24778         731 :         if (__pyx_t_12) {
   24779             : 
   24780             :           /* "scipy/sparse/csgraph/_matching.pyx":694
   24781             :  *                     v[j0p] += v0 - vj
   24782             :  *                 elif i0 != -1:
   24783             :  *                     j0p = j1p             # <<<<<<<<<<<<<<
   24784             :  *                     i0 = y[j0p]
   24785             :  *                 x[i] = j0p
   24786             :  */
   24787         487 :           __pyx_v_j0p = __pyx_v_j1p;
   24788             : 
   24789             :           /* "scipy/sparse/csgraph/_matching.pyx":695
   24790             :  *                 elif i0 != -1:
   24791             :  *                     j0p = j1p
   24792             :  *                     i0 = y[j0p]             # <<<<<<<<<<<<<<
   24793             :  *                 x[i] = j0p
   24794             :  *                 y[j0p] = i
   24795             :  */
   24796         487 :           __pyx_t_10 = __pyx_v_j0p;
   24797         487 :           __pyx_v_i0 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_10 * __pyx_v_y.strides[0]) )));
   24798             : 
   24799             :           /* "scipy/sparse/csgraph/_matching.pyx":693
   24800             :  *                 if v0 < vj:
   24801             :  *                     v[j0p] += v0 - vj
   24802             :  *                 elif i0 != -1:             # <<<<<<<<<<<<<<
   24803             :  *                     j0p = j1p
   24804             :  *                     i0 = y[j0p]
   24805             :  */
   24806             :         }
   24807         244 :         __pyx_L42:;
   24808             : 
   24809             :         /* "scipy/sparse/csgraph/_matching.pyx":696
   24810             :  *                     j0p = j1p
   24811             :  *                     i0 = y[j0p]
   24812             :  *                 x[i] = j0p             # <<<<<<<<<<<<<<
   24813             :  *                 y[j0p] = i
   24814             :  *                 if i0 != -1:
   24815             :  */
   24816       11370 :         __pyx_t_10 = __pyx_v_i;
   24817       11370 :         *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_10 * __pyx_v_x.strides[0]) )) = __pyx_v_j0p;
   24818             : 
   24819             :         /* "scipy/sparse/csgraph/_matching.pyx":697
   24820             :  *                     i0 = y[j0p]
   24821             :  *                 x[i] = j0p
   24822             :  *                 y[j0p] = i             # <<<<<<<<<<<<<<
   24823             :  *                 if i0 != -1:
   24824             :  *                     if v0 < vj:
   24825             :  */
   24826       11370 :         __pyx_t_10 = __pyx_v_j0p;
   24827       11370 :         *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_10 * __pyx_v_y.strides[0]) )) = __pyx_v_i;
   24828             : 
   24829             :         /* "scipy/sparse/csgraph/_matching.pyx":698
   24830             :  *                 x[i] = j0p
   24831             :  *                 y[j0p] = i
   24832             :  *                 if i0 != -1:             # <<<<<<<<<<<<<<
   24833             :  *                     if v0 < vj:
   24834             :  *                         h -= 1
   24835             :  */
   24836       11370 :         __pyx_t_12 = (__pyx_v_i0 != -1L);
   24837       11370 :         if (__pyx_t_12) {
   24838             : 
   24839             :           /* "scipy/sparse/csgraph/_matching.pyx":699
   24840             :  *                 y[j0p] = i
   24841             :  *                 if i0 != -1:
   24842             :  *                     if v0 < vj:             # <<<<<<<<<<<<<<
   24843             :  *                         h -= 1
   24844             :  *                         free[h] = i0
   24845             :  */
   24846        9211 :           __pyx_t_12 = (__pyx_v_v0 < __pyx_v_vj);
   24847        9211 :           if (__pyx_t_12) {
   24848             : 
   24849             :             /* "scipy/sparse/csgraph/_matching.pyx":700
   24850             :  *                 if i0 != -1:
   24851             :  *                     if v0 < vj:
   24852             :  *                         h -= 1             # <<<<<<<<<<<<<<
   24853             :  *                         free[h] = i0
   24854             :  *                     else:
   24855             :  */
   24856        8757 :             __pyx_v_h = (__pyx_v_h - 1);
   24857             : 
   24858             :             /* "scipy/sparse/csgraph/_matching.pyx":701
   24859             :  *                     if v0 < vj:
   24860             :  *                         h -= 1
   24861             :  *                         free[h] = i0             # <<<<<<<<<<<<<<
   24862             :  *                     else:
   24863             :  *                         free[lp] = i0
   24864             :  */
   24865        8757 :             __pyx_t_10 = __pyx_v_h;
   24866        8757 :             *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_free.data + __pyx_t_10 * __pyx_v_free.strides[0]) )) = __pyx_v_i0;
   24867             : 
   24868             :             /* "scipy/sparse/csgraph/_matching.pyx":699
   24869             :  *                 y[j0p] = i
   24870             :  *                 if i0 != -1:
   24871             :  *                     if v0 < vj:             # <<<<<<<<<<<<<<
   24872             :  *                         h -= 1
   24873             :  *                         free[h] = i0
   24874             :  */
   24875        8757 :             goto __pyx_L44;
   24876             :           }
   24877             : 
   24878             :           /* "scipy/sparse/csgraph/_matching.pyx":703
   24879             :  *                         free[h] = i0
   24880             :  *                     else:
   24881             :  *                         free[lp] = i0             # <<<<<<<<<<<<<<
   24882             :  *                         lp += 1
   24883             :  *         l0 = lp
   24884             :  */
   24885             :           /*else*/ {
   24886         454 :             __pyx_t_10 = __pyx_v_lp;
   24887         454 :             *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_free.data + __pyx_t_10 * __pyx_v_free.strides[0]) )) = __pyx_v_i0;
   24888             : 
   24889             :             /* "scipy/sparse/csgraph/_matching.pyx":704
   24890             :  *                     else:
   24891             :  *                         free[lp] = i0
   24892             :  *                         lp += 1             # <<<<<<<<<<<<<<
   24893             :  *         l0 = lp
   24894             :  *     else:
   24895             :  */
   24896         454 :             __pyx_v_lp = (__pyx_v_lp + 1);
   24897             :           }
   24898             :           __pyx_L44:;
   24899             : 
   24900             :           /* "scipy/sparse/csgraph/_matching.pyx":698
   24901             :  *                 x[i] = j0p
   24902             :  *                 y[j0p] = i
   24903             :  *                 if i0 != -1:             # <<<<<<<<<<<<<<
   24904             :  *                     if v0 < vj:
   24905             :  *                         h -= 1
   24906             :  */
   24907             :         }
   24908             :       }
   24909             :     }
   24910             : 
   24911             :     /* "scipy/sparse/csgraph/_matching.pyx":705
   24912             :  *                         free[lp] = i0
   24913             :  *                         lp += 1
   24914             :  *         l0 = lp             # <<<<<<<<<<<<<<
   24915             :  *     else:
   24916             :  *         l0 = nr
   24917             :  */
   24918          66 :     __pyx_v_l0 = __pyx_v_lp;
   24919             : 
   24920             :     /* "scipy/sparse/csgraph/_matching.pyx":609
   24921             :  *     # We skip the initialization entirely in the non-square case and instead
   24922             :  *     # fill all of `free` explicitly.
   24923             :  *     if nr == nc:             # <<<<<<<<<<<<<<
   24924             :  *         # From here, proceed from line 55 in the original Pascal code, LAPJVS.P
   24925             :  *         for jp in range(nc):
   24926             :  */
   24927          66 :     goto __pyx_L11;
   24928             :   }
   24929             : 
   24930             :   /* "scipy/sparse/csgraph/_matching.pyx":707
   24931             :  *         l0 = lp
   24932             :  *     else:
   24933             :  *         l0 = nr             # <<<<<<<<<<<<<<
   24934             :  *         for i in range(nr):
   24935             :  *             free[i] = i
   24936             :  */
   24937             :   /*else*/ {
   24938           2 :     __pyx_v_l0 = __pyx_v_nr;
   24939             : 
   24940             :     /* "scipy/sparse/csgraph/_matching.pyx":708
   24941             :  *     else:
   24942             :  *         l0 = nr
   24943             :  *         for i in range(nr):             # <<<<<<<<<<<<<<
   24944             :  *             free[i] = i
   24945             :  * 
   24946             :  */
   24947           2 :     __pyx_t_7 = __pyx_v_nr;
   24948           2 :     __pyx_t_8 = __pyx_t_7;
   24949           2 :     for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
   24950           0 :       __pyx_v_i = __pyx_t_9;
   24951             : 
   24952             :       /* "scipy/sparse/csgraph/_matching.pyx":709
   24953             :  *         l0 = nr
   24954             :  *         for i in range(nr):
   24955             :  *             free[i] = i             # <<<<<<<<<<<<<<
   24956             :  * 
   24957             :  *     # In the original Pascal code, the solution for each l is inlined,
   24958             :  */
   24959           0 :       __pyx_t_10 = __pyx_v_i;
   24960           0 :       *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_free.data + __pyx_t_10 * __pyx_v_free.strides[0]) )) = __pyx_v_i;
   24961             :     }
   24962             :   }
   24963           2 :   __pyx_L11:;
   24964             : 
   24965             :   /* "scipy/sparse/csgraph/_matching.pyx":716
   24966             :  *     # function thus corresponds to lines 109--154 in the Pascal code,
   24967             :  *     # with lines 155 and 156 separated into two separate functions below.
   24968             :  *     td1 = -1             # <<<<<<<<<<<<<<
   24969             :  *     for l in range(l0):
   24970             :  *         td1 = _lapjvsp_single_l(l, nc, d, ok, free, first, kk, cc, v, lab,
   24971             :  */
   24972          68 :   __pyx_v_td1 = -1;
   24973             : 
   24974             :   /* "scipy/sparse/csgraph/_matching.pyx":717
   24975             :  *     # with lines 155 and 156 separated into two separate functions below.
   24976             :  *     td1 = -1
   24977             :  *     for l in range(l0):             # <<<<<<<<<<<<<<
   24978             :  *         td1 = _lapjvsp_single_l(l, nc, d, ok, free, first, kk, cc, v, lab,
   24979             :  *                                 todo, y, x, td1)
   24980             :  */
   24981          68 :   __pyx_t_7 = __pyx_v_l0;
   24982          68 :   __pyx_t_8 = __pyx_t_7;
   24983         258 :   for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
   24984         190 :     __pyx_v_l = __pyx_t_9;
   24985             : 
   24986             :     /* "scipy/sparse/csgraph/_matching.pyx":718
   24987             :  *     td1 = -1
   24988             :  *     for l in range(l0):
   24989             :  *         td1 = _lapjvsp_single_l(l, nc, d, ok, free, first, kk, cc, v, lab,             # <<<<<<<<<<<<<<
   24990             :  *                                 todo, y, x, td1)
   24991             :  *     return x
   24992             :  */
   24993         190 :     __pyx_t_13 = __pyx_f_5scipy_6sparse_7csgraph_9_matching__lapjvsp_single_l(__pyx_v_l, __pyx_v_nc, __pyx_v_d, __pyx_v_ok, __pyx_v_free, __pyx_v_first, __pyx_v_kk, __pyx_v_cc, __pyx_v_v, __pyx_v_lab, __pyx_v_todo, __pyx_v_y, __pyx_v_x, __pyx_v_td1); if (unlikely(__pyx_t_13 == ((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t)-2))) __PYX_ERR(0, 718, __pyx_L1_error)
   24994         190 :     __pyx_v_td1 = __pyx_t_13;
   24995             :   }
   24996             : 
   24997             :   /* "scipy/sparse/csgraph/_matching.pyx":720
   24998             :  *         td1 = _lapjvsp_single_l(l, nc, d, ok, free, first, kk, cc, v, lab,
   24999             :  *                                 todo, y, x, td1)
   25000             :  *     return x             # <<<<<<<<<<<<<<
   25001             :  * 
   25002             :  * 
   25003             :  */
   25004          68 :   __PYX_INC_MEMVIEW(&__pyx_v_x, 1);
   25005          68 :   __pyx_r = __pyx_v_x;
   25006          68 :   goto __pyx_L0;
   25007             : 
   25008             :   /* "scipy/sparse/csgraph/_matching.pyx":536
   25009             :  * @cython.boundscheck(False)
   25010             :  * @cython.wraparound(False)
   25011             :  * cdef ITYPE_t[:] _lapjvsp(ITYPE_t[:] first,             # <<<<<<<<<<<<<<
   25012             :  *                          ITYPE_t[:] kk,
   25013             :  *                          DTYPE_t[:] cc,
   25014             :  */
   25015             : 
   25016             :   /* function exit code */
   25017           0 :   __pyx_L1_error:;
   25018           0 :   __Pyx_XDECREF(__pyx_t_1);
   25019           0 :   __Pyx_XDECREF(__pyx_t_2);
   25020           0 :   __Pyx_XDECREF(__pyx_t_3);
   25021           0 :   __Pyx_XDECREF(__pyx_t_4);
   25022           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_5, 1);
   25023           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1);
   25024           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_11, 1);
   25025           0 :   __pyx_r.data = NULL;
   25026           0 :   __pyx_r.memview = NULL;
   25027           0 :   __Pyx_AddTraceback("scipy.sparse.csgraph._matching._lapjvsp", __pyx_clineno, __pyx_lineno, __pyx_filename);
   25028           0 :   goto __pyx_L2;
   25029          68 :   __pyx_L0:;
   25030          68 :   if (unlikely(!__pyx_r.memview)) {
   25031           0 :     PyErr_SetString(PyExc_TypeError, "Memoryview return value is not initialized");
   25032             :   }
   25033          68 :   __pyx_L2:;
   25034          68 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_v, 1);
   25035          68 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_x, 1);
   25036          68 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_y, 1);
   25037          68 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_u, 1);
   25038          68 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_d, 1);
   25039          68 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_ok, 1);
   25040          68 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_xinv, 1);
   25041          68 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_free, 1);
   25042          68 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_todo, 1);
   25043          68 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_lab, 1);
   25044          68 :   __Pyx_RefNannyFinishContext();
   25045          68 :   return __pyx_r;
   25046             : }
   25047             : 
   25048             : /* "scipy/sparse/csgraph/_matching.pyx":725
   25049             :  * @cython.boundscheck(False)
   25050             :  * @cython.wraparound(False)
   25051             :  * cdef ITYPE_t _lapjvsp_single_l(ITYPE_t l, ITYPE_t nc, DTYPE_t[:] d,             # <<<<<<<<<<<<<<
   25052             :  *                                BTYPE_t[:] ok, ITYPE_t[:] free,
   25053             :  *                                ITYPE_t[:] first, ITYPE_t[:] kk,
   25054             :  */
   25055             : 
   25056         190 : static __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_f_5scipy_6sparse_7csgraph_9_matching__lapjvsp_single_l(__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_l, __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_nc, __Pyx_memviewslice __pyx_v_d, __Pyx_memviewslice __pyx_v_ok, __Pyx_memviewslice __pyx_v_free, __Pyx_memviewslice __pyx_v_first, __Pyx_memviewslice __pyx_v_kk, __Pyx_memviewslice __pyx_v_cc, __Pyx_memviewslice __pyx_v_v, __Pyx_memviewslice __pyx_v_lab, __Pyx_memviewslice __pyx_v_todo, __Pyx_memviewslice __pyx_v_y, __Pyx_memviewslice __pyx_v_x, __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_td1) {
   25057         190 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_jp;
   25058         190 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_i0;
   25059         190 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_j;
   25060         190 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_t;
   25061         190 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_td2;
   25062         190 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_hp;
   25063         190 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_last;
   25064         190 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_j0;
   25065         190 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_i;
   25066         190 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_tp;
   25067         190 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t __pyx_v_min_diff;
   25068         190 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t __pyx_v_dj;
   25069         190 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t __pyx_v_h;
   25070         190 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t __pyx_v_vj;
   25071         190 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_r;
   25072             :   __Pyx_RefNannyDeclarations
   25073         190 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_1;
   25074         190 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_2;
   25075         190 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_3;
   25076         190 :   Py_ssize_t __pyx_t_4;
   25077         190 :   Py_ssize_t __pyx_t_5;
   25078         190 :   Py_ssize_t __pyx_t_6;
   25079         190 :   int __pyx_t_7;
   25080         190 :   long __pyx_t_8;
   25081         190 :   long __pyx_t_9;
   25082         190 :   PyObject *__pyx_t_10 = NULL;
   25083         190 :   int __pyx_t_11;
   25084         190 :   int __pyx_lineno = 0;
   25085         190 :   const char *__pyx_filename = NULL;
   25086         190 :   int __pyx_clineno = 0;
   25087         190 :   __Pyx_RefNannySetupContext("_lapjvsp_single_l", 1);
   25088             : 
   25089             :   /* "scipy/sparse/csgraph/_matching.pyx":734
   25090             :  *     cdef DTYPE_t min_diff, dj, h, vj
   25091             :  * 
   25092             :  *     for jp in range(nc):             # <<<<<<<<<<<<<<
   25093             :  *         d[jp] = INFINITY
   25094             :  *         ok[jp] = 0
   25095             :  */
   25096         190 :   __pyx_t_1 = __pyx_v_nc;
   25097         190 :   __pyx_t_2 = __pyx_t_1;
   25098       19190 :   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
   25099       19000 :     __pyx_v_jp = __pyx_t_3;
   25100             : 
   25101             :     /* "scipy/sparse/csgraph/_matching.pyx":735
   25102             :  * 
   25103             :  *     for jp in range(nc):
   25104             :  *         d[jp] = INFINITY             # <<<<<<<<<<<<<<
   25105             :  *         ok[jp] = 0
   25106             :  *     min_diff = INFINITY
   25107             :  */
   25108       19000 :     __pyx_t_4 = __pyx_v_jp;
   25109       19000 :     *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_d.data + __pyx_t_4 * __pyx_v_d.strides[0]) )) = INFINITY;
   25110             : 
   25111             :     /* "scipy/sparse/csgraph/_matching.pyx":736
   25112             :  *     for jp in range(nc):
   25113             :  *         d[jp] = INFINITY
   25114             :  *         ok[jp] = 0             # <<<<<<<<<<<<<<
   25115             :  *     min_diff = INFINITY
   25116             :  *     i0 = free[l]
   25117             :  */
   25118       19000 :     __pyx_t_4 = __pyx_v_jp;
   25119       19000 :     *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_BTYPE_t *) ( /* dim=0 */ (__pyx_v_ok.data + __pyx_t_4 * __pyx_v_ok.strides[0]) )) = 0;
   25120             :   }
   25121             : 
   25122             :   /* "scipy/sparse/csgraph/_matching.pyx":737
   25123             :  *         d[jp] = INFINITY
   25124             :  *         ok[jp] = 0
   25125             :  *     min_diff = INFINITY             # <<<<<<<<<<<<<<
   25126             :  *     i0 = free[l]
   25127             :  * 
   25128             :  */
   25129         190 :   __pyx_v_min_diff = INFINITY;
   25130             : 
   25131             :   /* "scipy/sparse/csgraph/_matching.pyx":738
   25132             :  *         ok[jp] = 0
   25133             :  *     min_diff = INFINITY
   25134             :  *     i0 = free[l]             # <<<<<<<<<<<<<<
   25135             :  * 
   25136             :  *     for t in range(first[i0], first[i0 + 1]):
   25137             :  */
   25138         190 :   __pyx_t_4 = __pyx_v_l;
   25139         190 :   __pyx_v_i0 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_free.data + __pyx_t_4 * __pyx_v_free.strides[0]) )));
   25140             : 
   25141             :   /* "scipy/sparse/csgraph/_matching.pyx":740
   25142             :  *     i0 = free[l]
   25143             :  * 
   25144             :  *     for t in range(first[i0], first[i0 + 1]):             # <<<<<<<<<<<<<<
   25145             :  *         j = kk[t]
   25146             :  *         dj = cc[t] - v[j]
   25147             :  */
   25148         190 :   __pyx_t_4 = (__pyx_v_i0 + 1);
   25149         190 :   __pyx_t_1 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_first.data + __pyx_t_4 * __pyx_v_first.strides[0]) )));
   25150         190 :   __pyx_t_4 = __pyx_v_i0;
   25151         190 :   __pyx_t_2 = __pyx_t_1;
   25152        1386 :   for (__pyx_t_3 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_first.data + __pyx_t_4 * __pyx_v_first.strides[0]) ))); __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
   25153        1196 :     __pyx_v_t = __pyx_t_3;
   25154             : 
   25155             :     /* "scipy/sparse/csgraph/_matching.pyx":741
   25156             :  * 
   25157             :  *     for t in range(first[i0], first[i0 + 1]):
   25158             :  *         j = kk[t]             # <<<<<<<<<<<<<<
   25159             :  *         dj = cc[t] - v[j]
   25160             :  *         d[j] = dj
   25161             :  */
   25162        1196 :     __pyx_t_5 = __pyx_v_t;
   25163        1196 :     __pyx_v_j = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_kk.data + __pyx_t_5 * __pyx_v_kk.strides[0]) )));
   25164             : 
   25165             :     /* "scipy/sparse/csgraph/_matching.pyx":742
   25166             :  *     for t in range(first[i0], first[i0 + 1]):
   25167             :  *         j = kk[t]
   25168             :  *         dj = cc[t] - v[j]             # <<<<<<<<<<<<<<
   25169             :  *         d[j] = dj
   25170             :  *         lab[j] = i0
   25171             :  */
   25172        1196 :     __pyx_t_5 = __pyx_v_t;
   25173        1196 :     __pyx_t_6 = __pyx_v_j;
   25174        1196 :     __pyx_v_dj = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_cc.data + __pyx_t_5 * __pyx_v_cc.strides[0]) ))) - (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_6 * __pyx_v_v.strides[0]) ))));
   25175             : 
   25176             :     /* "scipy/sparse/csgraph/_matching.pyx":743
   25177             :  *         j = kk[t]
   25178             :  *         dj = cc[t] - v[j]
   25179             :  *         d[j] = dj             # <<<<<<<<<<<<<<
   25180             :  *         lab[j] = i0
   25181             :  *         if dj <= min_diff:
   25182             :  */
   25183        1196 :     __pyx_t_6 = __pyx_v_j;
   25184        1196 :     *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_d.data + __pyx_t_6 * __pyx_v_d.strides[0]) )) = __pyx_v_dj;
   25185             : 
   25186             :     /* "scipy/sparse/csgraph/_matching.pyx":744
   25187             :  *         dj = cc[t] - v[j]
   25188             :  *         d[j] = dj
   25189             :  *         lab[j] = i0             # <<<<<<<<<<<<<<
   25190             :  *         if dj <= min_diff:
   25191             :  *             if dj < min_diff:
   25192             :  */
   25193        1196 :     __pyx_t_6 = __pyx_v_j;
   25194        1196 :     *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_lab.data + __pyx_t_6 * __pyx_v_lab.strides[0]) )) = __pyx_v_i0;
   25195             : 
   25196             :     /* "scipy/sparse/csgraph/_matching.pyx":745
   25197             :  *         d[j] = dj
   25198             :  *         lab[j] = i0
   25199             :  *         if dj <= min_diff:             # <<<<<<<<<<<<<<
   25200             :  *             if dj < min_diff:
   25201             :  *                 td1 = -1
   25202             :  */
   25203        1196 :     __pyx_t_7 = (__pyx_v_dj <= __pyx_v_min_diff);
   25204        1196 :     if (__pyx_t_7) {
   25205             : 
   25206             :       /* "scipy/sparse/csgraph/_matching.pyx":746
   25207             :  *         lab[j] = i0
   25208             :  *         if dj <= min_diff:
   25209             :  *             if dj < min_diff:             # <<<<<<<<<<<<<<
   25210             :  *                 td1 = -1
   25211             :  *                 min_diff = dj
   25212             :  */
   25213         587 :       __pyx_t_7 = (__pyx_v_dj < __pyx_v_min_diff);
   25214         587 :       if (__pyx_t_7) {
   25215             : 
   25216             :         /* "scipy/sparse/csgraph/_matching.pyx":747
   25217             :  *         if dj <= min_diff:
   25218             :  *             if dj < min_diff:
   25219             :  *                 td1 = -1             # <<<<<<<<<<<<<<
   25220             :  *                 min_diff = dj
   25221             :  *             td1 += 1
   25222             :  */
   25223         465 :         __pyx_v_td1 = -1;
   25224             : 
   25225             :         /* "scipy/sparse/csgraph/_matching.pyx":748
   25226             :  *             if dj < min_diff:
   25227             :  *                 td1 = -1
   25228             :  *                 min_diff = dj             # <<<<<<<<<<<<<<
   25229             :  *             td1 += 1
   25230             :  *             todo[td1] = j
   25231             :  */
   25232         465 :         __pyx_v_min_diff = __pyx_v_dj;
   25233             : 
   25234             :         /* "scipy/sparse/csgraph/_matching.pyx":746
   25235             :  *         lab[j] = i0
   25236             :  *         if dj <= min_diff:
   25237             :  *             if dj < min_diff:             # <<<<<<<<<<<<<<
   25238             :  *                 td1 = -1
   25239             :  *                 min_diff = dj
   25240             :  */
   25241             :       }
   25242             : 
   25243             :       /* "scipy/sparse/csgraph/_matching.pyx":749
   25244             :  *                 td1 = -1
   25245             :  *                 min_diff = dj
   25246             :  *             td1 += 1             # <<<<<<<<<<<<<<
   25247             :  *             todo[td1] = j
   25248             :  * 
   25249             :  */
   25250         587 :       __pyx_v_td1 = (__pyx_v_td1 + 1);
   25251             : 
   25252             :       /* "scipy/sparse/csgraph/_matching.pyx":750
   25253             :  *                 min_diff = dj
   25254             :  *             td1 += 1
   25255             :  *             todo[td1] = j             # <<<<<<<<<<<<<<
   25256             :  * 
   25257             :  *     for hp in range(td1 + 1):
   25258             :  */
   25259         587 :       __pyx_t_6 = __pyx_v_td1;
   25260         587 :       *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_todo.data + __pyx_t_6 * __pyx_v_todo.strides[0]) )) = __pyx_v_j;
   25261             : 
   25262             :       /* "scipy/sparse/csgraph/_matching.pyx":745
   25263             :  *         d[j] = dj
   25264             :  *         lab[j] = i0
   25265             :  *         if dj <= min_diff:             # <<<<<<<<<<<<<<
   25266             :  *             if dj < min_diff:
   25267             :  *                 td1 = -1
   25268             :  */
   25269             :     }
   25270             :   }
   25271             : 
   25272             :   /* "scipy/sparse/csgraph/_matching.pyx":752
   25273             :  *             todo[td1] = j
   25274             :  * 
   25275             :  *     for hp in range(td1 + 1):             # <<<<<<<<<<<<<<
   25276             :  *         j = todo[hp]
   25277             :  *         if y[j] == -1:
   25278             :  */
   25279         190 :   __pyx_t_8 = (__pyx_v_td1 + 1);
   25280         190 :   __pyx_t_9 = __pyx_t_8;
   25281         484 :   for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_9; __pyx_t_1+=1) {
   25282         297 :     __pyx_v_hp = __pyx_t_1;
   25283             : 
   25284             :     /* "scipy/sparse/csgraph/_matching.pyx":753
   25285             :  * 
   25286             :  *     for hp in range(td1 + 1):
   25287             :  *         j = todo[hp]             # <<<<<<<<<<<<<<
   25288             :  *         if y[j] == -1:
   25289             :  *             _lapjvsp_update_assignments(lab, y, x, j, i0)
   25290             :  */
   25291         297 :     __pyx_t_4 = __pyx_v_hp;
   25292         297 :     __pyx_v_j = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_todo.data + __pyx_t_4 * __pyx_v_todo.strides[0]) )));
   25293             : 
   25294             :     /* "scipy/sparse/csgraph/_matching.pyx":754
   25295             :  *     for hp in range(td1 + 1):
   25296             :  *         j = todo[hp]
   25297             :  *         if y[j] == -1:             # <<<<<<<<<<<<<<
   25298             :  *             _lapjvsp_update_assignments(lab, y, x, j, i0)
   25299             :  *             return td1
   25300             :  */
   25301         297 :     __pyx_t_4 = __pyx_v_j;
   25302         297 :     __pyx_t_7 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_4 * __pyx_v_y.strides[0]) ))) == -1L);
   25303         297 :     if (__pyx_t_7) {
   25304             : 
   25305             :       /* "scipy/sparse/csgraph/_matching.pyx":755
   25306             :  *         j = todo[hp]
   25307             :  *         if y[j] == -1:
   25308             :  *             _lapjvsp_update_assignments(lab, y, x, j, i0)             # <<<<<<<<<<<<<<
   25309             :  *             return td1
   25310             :  *         ok[j] = 1
   25311             :  */
   25312           6 :       __pyx_t_10 = __pyx_f_5scipy_6sparse_7csgraph_9_matching__lapjvsp_update_assignments(__pyx_v_lab, __pyx_v_y, __pyx_v_x, __pyx_v_j, __pyx_v_i0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 755, __pyx_L1_error)
   25313           3 :       __Pyx_GOTREF(__pyx_t_10);
   25314           6 :       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   25315             : 
   25316             :       /* "scipy/sparse/csgraph/_matching.pyx":756
   25317             :  *         if y[j] == -1:
   25318             :  *             _lapjvsp_update_assignments(lab, y, x, j, i0)
   25319             :  *             return td1             # <<<<<<<<<<<<<<
   25320             :  *         ok[j] = 1
   25321             :  *     td2 = nc - 1
   25322             :  */
   25323           3 :       __pyx_r = __pyx_v_td1;
   25324           3 :       goto __pyx_L0;
   25325             : 
   25326             :       /* "scipy/sparse/csgraph/_matching.pyx":754
   25327             :  *     for hp in range(td1 + 1):
   25328             :  *         j = todo[hp]
   25329             :  *         if y[j] == -1:             # <<<<<<<<<<<<<<
   25330             :  *             _lapjvsp_update_assignments(lab, y, x, j, i0)
   25331             :  *             return td1
   25332             :  */
   25333             :     }
   25334             : 
   25335             :     /* "scipy/sparse/csgraph/_matching.pyx":757
   25336             :  *             _lapjvsp_update_assignments(lab, y, x, j, i0)
   25337             :  *             return td1
   25338             :  *         ok[j] = 1             # <<<<<<<<<<<<<<
   25339             :  *     td2 = nc - 1
   25340             :  *     last = nc
   25341             :  */
   25342         294 :     __pyx_t_4 = __pyx_v_j;
   25343         294 :     *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_BTYPE_t *) ( /* dim=0 */ (__pyx_v_ok.data + __pyx_t_4 * __pyx_v_ok.strides[0]) )) = 1;
   25344             :   }
   25345             : 
   25346             :   /* "scipy/sparse/csgraph/_matching.pyx":758
   25347             :  *             return td1
   25348             :  *         ok[j] = 1
   25349             :  *     td2 = nc - 1             # <<<<<<<<<<<<<<
   25350             :  *     last = nc
   25351             :  * 
   25352             :  */
   25353         187 :   __pyx_v_td2 = (__pyx_v_nc - 1);
   25354             : 
   25355             :   /* "scipy/sparse/csgraph/_matching.pyx":759
   25356             :  *         ok[j] = 1
   25357             :  *     td2 = nc - 1
   25358             :  *     last = nc             # <<<<<<<<<<<<<<
   25359             :  * 
   25360             :  *     while True:
   25361             :  */
   25362         187 :   __pyx_v_last = __pyx_v_nc;
   25363             : 
   25364             :   /* "scipy/sparse/csgraph/_matching.pyx":761
   25365             :  *     last = nc
   25366             :  * 
   25367             :  *     while True:             # <<<<<<<<<<<<<<
   25368             :  *         # If td1 is negative at this point, that corresponds to no assignments
   25369             :  *         # having been made in the previous run, so no full matching exists
   25370             :  */
   25371        6703 :   while (1) {
   25372             : 
   25373             :     /* "scipy/sparse/csgraph/_matching.pyx":765
   25374             :  *         # having been made in the previous run, so no full matching exists
   25375             :  *         # and we error out.
   25376             :  *         if td1 < 0:             # <<<<<<<<<<<<<<
   25377             :  *             raise ValueError('no full matching exists')
   25378             :  *         j0 = todo[td1]
   25379             :  */
   25380        6703 :     __pyx_t_7 = (__pyx_v_td1 < 0);
   25381        6703 :     if (unlikely(__pyx_t_7)) {
   25382             : 
   25383             :       /* "scipy/sparse/csgraph/_matching.pyx":766
   25384             :  *         # and we error out.
   25385             :  *         if td1 < 0:
   25386             :  *             raise ValueError('no full matching exists')             # <<<<<<<<<<<<<<
   25387             :  *         j0 = todo[td1]
   25388             :  *         td1 -= 1
   25389             :  */
   25390           0 :       __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 766, __pyx_L1_error)
   25391           0 :       __Pyx_GOTREF(__pyx_t_10);
   25392           0 :       __Pyx_Raise(__pyx_t_10, 0, 0, 0);
   25393           0 :       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   25394           0 :       __PYX_ERR(0, 766, __pyx_L1_error)
   25395             : 
   25396             :       /* "scipy/sparse/csgraph/_matching.pyx":765
   25397             :  *         # having been made in the previous run, so no full matching exists
   25398             :  *         # and we error out.
   25399             :  *         if td1 < 0:             # <<<<<<<<<<<<<<
   25400             :  *             raise ValueError('no full matching exists')
   25401             :  *         j0 = todo[td1]
   25402             :  */
   25403             :     }
   25404             : 
   25405             :     /* "scipy/sparse/csgraph/_matching.pyx":767
   25406             :  *         if td1 < 0:
   25407             :  *             raise ValueError('no full matching exists')
   25408             :  *         j0 = todo[td1]             # <<<<<<<<<<<<<<
   25409             :  *         td1 -= 1
   25410             :  *         i = y[j0]
   25411             :  */
   25412        6703 :     __pyx_t_4 = __pyx_v_td1;
   25413        6703 :     __pyx_v_j0 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_todo.data + __pyx_t_4 * __pyx_v_todo.strides[0]) )));
   25414             : 
   25415             :     /* "scipy/sparse/csgraph/_matching.pyx":768
   25416             :  *             raise ValueError('no full matching exists')
   25417             :  *         j0 = todo[td1]
   25418             :  *         td1 -= 1             # <<<<<<<<<<<<<<
   25419             :  *         i = y[j0]
   25420             :  *         todo[td2] = j0
   25421             :  */
   25422        6703 :     __pyx_v_td1 = (__pyx_v_td1 - 1);
   25423             : 
   25424             :     /* "scipy/sparse/csgraph/_matching.pyx":769
   25425             :  *         j0 = todo[td1]
   25426             :  *         td1 -= 1
   25427             :  *         i = y[j0]             # <<<<<<<<<<<<<<
   25428             :  *         todo[td2] = j0
   25429             :  *         td2 -= 1
   25430             :  */
   25431        6703 :     __pyx_t_4 = __pyx_v_j0;
   25432        6703 :     __pyx_v_i = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_4 * __pyx_v_y.strides[0]) )));
   25433             : 
   25434             :     /* "scipy/sparse/csgraph/_matching.pyx":770
   25435             :  *         td1 -= 1
   25436             :  *         i = y[j0]
   25437             :  *         todo[td2] = j0             # <<<<<<<<<<<<<<
   25438             :  *         td2 -= 1
   25439             :  *         tp = first[i]
   25440             :  */
   25441        6703 :     __pyx_t_4 = __pyx_v_td2;
   25442        6703 :     *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_todo.data + __pyx_t_4 * __pyx_v_todo.strides[0]) )) = __pyx_v_j0;
   25443             : 
   25444             :     /* "scipy/sparse/csgraph/_matching.pyx":771
   25445             :  *         i = y[j0]
   25446             :  *         todo[td2] = j0
   25447             :  *         td2 -= 1             # <<<<<<<<<<<<<<
   25448             :  *         tp = first[i]
   25449             :  *         while kk[tp] != j0:
   25450             :  */
   25451        6703 :     __pyx_v_td2 = (__pyx_v_td2 - 1);
   25452             : 
   25453             :     /* "scipy/sparse/csgraph/_matching.pyx":772
   25454             :  *         todo[td2] = j0
   25455             :  *         td2 -= 1
   25456             :  *         tp = first[i]             # <<<<<<<<<<<<<<
   25457             :  *         while kk[tp] != j0:
   25458             :  *             tp += 1
   25459             :  */
   25460        6703 :     __pyx_t_4 = __pyx_v_i;
   25461        6703 :     __pyx_v_tp = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_first.data + __pyx_t_4 * __pyx_v_first.strides[0]) )));
   25462             : 
   25463             :     /* "scipy/sparse/csgraph/_matching.pyx":773
   25464             :  *         td2 -= 1
   25465             :  *         tp = first[i]
   25466             :  *         while kk[tp] != j0:             # <<<<<<<<<<<<<<
   25467             :  *             tp += 1
   25468             :  *         h = cc[tp] - v[j0] - min_diff
   25469             :  */
   25470       42207 :     while (1) {
   25471       24455 :       __pyx_t_4 = __pyx_v_tp;
   25472       24455 :       __pyx_t_7 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_kk.data + __pyx_t_4 * __pyx_v_kk.strides[0]) ))) != __pyx_v_j0);
   25473       24455 :       if (!__pyx_t_7) break;
   25474             : 
   25475             :       /* "scipy/sparse/csgraph/_matching.pyx":774
   25476             :  *         tp = first[i]
   25477             :  *         while kk[tp] != j0:
   25478             :  *             tp += 1             # <<<<<<<<<<<<<<
   25479             :  *         h = cc[tp] - v[j0] - min_diff
   25480             :  * 
   25481             :  */
   25482       17752 :       __pyx_v_tp = (__pyx_v_tp + 1);
   25483             :     }
   25484             : 
   25485             :     /* "scipy/sparse/csgraph/_matching.pyx":775
   25486             :  *         while kk[tp] != j0:
   25487             :  *             tp += 1
   25488             :  *         h = cc[tp] - v[j0] - min_diff             # <<<<<<<<<<<<<<
   25489             :  * 
   25490             :  *         for t in range(first[i], first[i + 1]):
   25491             :  */
   25492        6703 :     __pyx_t_4 = __pyx_v_tp;
   25493        6703 :     __pyx_t_6 = __pyx_v_j0;
   25494        6703 :     __pyx_v_h = (((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_cc.data + __pyx_t_4 * __pyx_v_cc.strides[0]) ))) - (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_6 * __pyx_v_v.strides[0]) )))) - __pyx_v_min_diff);
   25495             : 
   25496             :     /* "scipy/sparse/csgraph/_matching.pyx":777
   25497             :  *         h = cc[tp] - v[j0] - min_diff
   25498             :  * 
   25499             :  *         for t in range(first[i], first[i + 1]):             # <<<<<<<<<<<<<<
   25500             :  *             j = kk[t]
   25501             :  *             if ok[j] == 0:
   25502             :  */
   25503        6703 :     __pyx_t_6 = (__pyx_v_i + 1);
   25504        6703 :     __pyx_t_1 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_first.data + __pyx_t_6 * __pyx_v_first.strides[0]) )));
   25505        6703 :     __pyx_t_6 = __pyx_v_i;
   25506        6703 :     __pyx_t_2 = __pyx_t_1;
   25507       47538 :     for (__pyx_t_3 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_first.data + __pyx_t_6 * __pyx_v_first.strides[0]) ))); __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
   25508       40980 :       __pyx_v_t = __pyx_t_3;
   25509             : 
   25510             :       /* "scipy/sparse/csgraph/_matching.pyx":778
   25511             :  * 
   25512             :  *         for t in range(first[i], first[i + 1]):
   25513             :  *             j = kk[t]             # <<<<<<<<<<<<<<
   25514             :  *             if ok[j] == 0:
   25515             :  *                 vj = cc[t] - v[j] - h
   25516             :  */
   25517       40980 :       __pyx_t_4 = __pyx_v_t;
   25518       40980 :       __pyx_v_j = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_kk.data + __pyx_t_4 * __pyx_v_kk.strides[0]) )));
   25519             : 
   25520             :       /* "scipy/sparse/csgraph/_matching.pyx":779
   25521             :  *         for t in range(first[i], first[i + 1]):
   25522             :  *             j = kk[t]
   25523             :  *             if ok[j] == 0:             # <<<<<<<<<<<<<<
   25524             :  *                 vj = cc[t] - v[j] - h
   25525             :  *                 if vj < d[j]:
   25526             :  */
   25527       40980 :       __pyx_t_4 = __pyx_v_j;
   25528       40980 :       __pyx_t_7 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_BTYPE_t *) ( /* dim=0 */ (__pyx_v_ok.data + __pyx_t_4 * __pyx_v_ok.strides[0]) ))) == 0);
   25529       40980 :       if (__pyx_t_7) {
   25530             : 
   25531             :         /* "scipy/sparse/csgraph/_matching.pyx":780
   25532             :  *             j = kk[t]
   25533             :  *             if ok[j] == 0:
   25534             :  *                 vj = cc[t] - v[j] - h             # <<<<<<<<<<<<<<
   25535             :  *                 if vj < d[j]:
   25536             :  *                     d[j] = vj
   25537             :  */
   25538       25649 :         __pyx_t_4 = __pyx_v_t;
   25539       25649 :         __pyx_t_5 = __pyx_v_j;
   25540       25649 :         __pyx_v_vj = (((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_cc.data + __pyx_t_4 * __pyx_v_cc.strides[0]) ))) - (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_5 * __pyx_v_v.strides[0]) )))) - __pyx_v_h);
   25541             : 
   25542             :         /* "scipy/sparse/csgraph/_matching.pyx":781
   25543             :  *             if ok[j] == 0:
   25544             :  *                 vj = cc[t] - v[j] - h
   25545             :  *                 if vj < d[j]:             # <<<<<<<<<<<<<<
   25546             :  *                     d[j] = vj
   25547             :  *                     lab[j] = i
   25548             :  */
   25549       25649 :         __pyx_t_5 = __pyx_v_j;
   25550       25649 :         __pyx_t_7 = (__pyx_v_vj < (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_d.data + __pyx_t_5 * __pyx_v_d.strides[0]) ))));
   25551       25649 :         if (__pyx_t_7) {
   25552             : 
   25553             :           /* "scipy/sparse/csgraph/_matching.pyx":782
   25554             :  *                 vj = cc[t] - v[j] - h
   25555             :  *                 if vj < d[j]:
   25556             :  *                     d[j] = vj             # <<<<<<<<<<<<<<
   25557             :  *                     lab[j] = i
   25558             :  *                     if vj == min_diff:
   25559             :  */
   25560       18506 :           __pyx_t_5 = __pyx_v_j;
   25561       18506 :           *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_d.data + __pyx_t_5 * __pyx_v_d.strides[0]) )) = __pyx_v_vj;
   25562             : 
   25563             :           /* "scipy/sparse/csgraph/_matching.pyx":783
   25564             :  *                 if vj < d[j]:
   25565             :  *                     d[j] = vj
   25566             :  *                     lab[j] = i             # <<<<<<<<<<<<<<
   25567             :  *                     if vj == min_diff:
   25568             :  *                         if y[j] == -1:
   25569             :  */
   25570       18506 :           __pyx_t_5 = __pyx_v_j;
   25571       18506 :           *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_lab.data + __pyx_t_5 * __pyx_v_lab.strides[0]) )) = __pyx_v_i;
   25572             : 
   25573             :           /* "scipy/sparse/csgraph/_matching.pyx":784
   25574             :  *                     d[j] = vj
   25575             :  *                     lab[j] = i
   25576             :  *                     if vj == min_diff:             # <<<<<<<<<<<<<<
   25577             :  *                         if y[j] == -1:
   25578             :  *                             _lapjvsp_update_dual(nc, d, v, todo,
   25579             :  */
   25580       18506 :           __pyx_t_7 = (__pyx_v_vj == __pyx_v_min_diff);
   25581       18506 :           if (__pyx_t_7) {
   25582             : 
   25583             :             /* "scipy/sparse/csgraph/_matching.pyx":785
   25584             :  *                     lab[j] = i
   25585             :  *                     if vj == min_diff:
   25586             :  *                         if y[j] == -1:             # <<<<<<<<<<<<<<
   25587             :  *                             _lapjvsp_update_dual(nc, d, v, todo,
   25588             :  *                                                  last, min_diff)
   25589             :  */
   25590        4574 :             __pyx_t_5 = __pyx_v_j;
   25591        4574 :             __pyx_t_7 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_5 * __pyx_v_y.strides[0]) ))) == -1L);
   25592        4574 :             if (__pyx_t_7) {
   25593             : 
   25594             :               /* "scipy/sparse/csgraph/_matching.pyx":786
   25595             :  *                     if vj == min_diff:
   25596             :  *                         if y[j] == -1:
   25597             :  *                             _lapjvsp_update_dual(nc, d, v, todo,             # <<<<<<<<<<<<<<
   25598             :  *                                                  last, min_diff)
   25599             :  *                             _lapjvsp_update_assignments(lab, y, x, j, i0)
   25600             :  */
   25601         145 :               __pyx_t_10 = __pyx_f_5scipy_6sparse_7csgraph_9_matching__lapjvsp_update_dual(__pyx_v_nc, __pyx_v_d, __pyx_v_v, __pyx_v_todo, __pyx_v_last, __pyx_v_min_diff); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 786, __pyx_L1_error)
   25602         145 :               __Pyx_GOTREF(__pyx_t_10);
   25603         290 :               __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   25604             : 
   25605             :               /* "scipy/sparse/csgraph/_matching.pyx":788
   25606             :  *                             _lapjvsp_update_dual(nc, d, v, todo,
   25607             :  *                                                  last, min_diff)
   25608             :  *                             _lapjvsp_update_assignments(lab, y, x, j, i0)             # <<<<<<<<<<<<<<
   25609             :  *                             return td1
   25610             :  *                         td1 += 1
   25611             :  */
   25612         290 :               __pyx_t_10 = __pyx_f_5scipy_6sparse_7csgraph_9_matching__lapjvsp_update_assignments(__pyx_v_lab, __pyx_v_y, __pyx_v_x, __pyx_v_j, __pyx_v_i0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 788, __pyx_L1_error)
   25613         145 :               __Pyx_GOTREF(__pyx_t_10);
   25614         290 :               __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   25615             : 
   25616             :               /* "scipy/sparse/csgraph/_matching.pyx":789
   25617             :  *                                                  last, min_diff)
   25618             :  *                             _lapjvsp_update_assignments(lab, y, x, j, i0)
   25619             :  *                             return td1             # <<<<<<<<<<<<<<
   25620             :  *                         td1 += 1
   25621             :  *                         todo[td1] = j
   25622             :  */
   25623         145 :               __pyx_r = __pyx_v_td1;
   25624         145 :               goto __pyx_L0;
   25625             : 
   25626             :               /* "scipy/sparse/csgraph/_matching.pyx":785
   25627             :  *                     lab[j] = i
   25628             :  *                     if vj == min_diff:
   25629             :  *                         if y[j] == -1:             # <<<<<<<<<<<<<<
   25630             :  *                             _lapjvsp_update_dual(nc, d, v, todo,
   25631             :  *                                                  last, min_diff)
   25632             :  */
   25633             :             }
   25634             : 
   25635             :             /* "scipy/sparse/csgraph/_matching.pyx":790
   25636             :  *                             _lapjvsp_update_assignments(lab, y, x, j, i0)
   25637             :  *                             return td1
   25638             :  *                         td1 += 1             # <<<<<<<<<<<<<<
   25639             :  *                         todo[td1] = j
   25640             :  *                         ok[j] = 1
   25641             :  */
   25642        4429 :             __pyx_v_td1 = (__pyx_v_td1 + 1);
   25643             : 
   25644             :             /* "scipy/sparse/csgraph/_matching.pyx":791
   25645             :  *                             return td1
   25646             :  *                         td1 += 1
   25647             :  *                         todo[td1] = j             # <<<<<<<<<<<<<<
   25648             :  *                         ok[j] = 1
   25649             :  * 
   25650             :  */
   25651        4429 :             __pyx_t_5 = __pyx_v_td1;
   25652        4429 :             *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_todo.data + __pyx_t_5 * __pyx_v_todo.strides[0]) )) = __pyx_v_j;
   25653             : 
   25654             :             /* "scipy/sparse/csgraph/_matching.pyx":792
   25655             :  *                         td1 += 1
   25656             :  *                         todo[td1] = j
   25657             :  *                         ok[j] = 1             # <<<<<<<<<<<<<<
   25658             :  * 
   25659             :  *         if td1 == -1:
   25660             :  */
   25661        4429 :             __pyx_t_5 = __pyx_v_j;
   25662        4429 :             *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_BTYPE_t *) ( /* dim=0 */ (__pyx_v_ok.data + __pyx_t_5 * __pyx_v_ok.strides[0]) )) = 1;
   25663             : 
   25664             :             /* "scipy/sparse/csgraph/_matching.pyx":784
   25665             :  *                     d[j] = vj
   25666             :  *                     lab[j] = i
   25667             :  *                     if vj == min_diff:             # <<<<<<<<<<<<<<
   25668             :  *                         if y[j] == -1:
   25669             :  *                             _lapjvsp_update_dual(nc, d, v, todo,
   25670             :  */
   25671             :           }
   25672             : 
   25673             :           /* "scipy/sparse/csgraph/_matching.pyx":781
   25674             :  *             if ok[j] == 0:
   25675             :  *                 vj = cc[t] - v[j] - h
   25676             :  *                 if vj < d[j]:             # <<<<<<<<<<<<<<
   25677             :  *                     d[j] = vj
   25678             :  *                     lab[j] = i
   25679             :  */
   25680             :         }
   25681             : 
   25682             :         /* "scipy/sparse/csgraph/_matching.pyx":779
   25683             :  *         for t in range(first[i], first[i + 1]):
   25684             :  *             j = kk[t]
   25685             :  *             if ok[j] == 0:             # <<<<<<<<<<<<<<
   25686             :  *                 vj = cc[t] - v[j] - h
   25687             :  *                 if vj < d[j]:
   25688             :  */
   25689             :       }
   25690             :     }
   25691             : 
   25692             :     /* "scipy/sparse/csgraph/_matching.pyx":794
   25693             :  *                         ok[j] = 1
   25694             :  * 
   25695             :  *         if td1 == -1:             # <<<<<<<<<<<<<<
   25696             :  *             # The original Pascal code uses finite numbers instead of INFINITY
   25697             :  *             # so we need to adjust slightly here.
   25698             :  */
   25699        6558 :     __pyx_t_7 = (__pyx_v_td1 == -1L);
   25700        6558 :     if (__pyx_t_7) {
   25701             : 
   25702             :       /* "scipy/sparse/csgraph/_matching.pyx":797
   25703             :  *             # The original Pascal code uses finite numbers instead of INFINITY
   25704             :  *             # so we need to adjust slightly here.
   25705             :  *             min_diff = INFINITY             # <<<<<<<<<<<<<<
   25706             :  *             last = td2 + 1
   25707             :  * 
   25708             :  */
   25709             :       __pyx_v_min_diff = INFINITY;
   25710             : 
   25711             :       /* "scipy/sparse/csgraph/_matching.pyx":798
   25712             :  *             # so we need to adjust slightly here.
   25713             :  *             min_diff = INFINITY
   25714             :  *             last = td2 + 1             # <<<<<<<<<<<<<<
   25715             :  * 
   25716             :  *             for jp in range(nc):
   25717             :  */
   25718      131098 :       __pyx_v_last = (__pyx_v_td2 + 1);
   25719             : 
   25720             :       /* "scipy/sparse/csgraph/_matching.pyx":800
   25721             :  *             last = td2 + 1
   25722             :  * 
   25723             :  *             for jp in range(nc):             # <<<<<<<<<<<<<<
   25724             :  *                 if d[jp] != INFINITY and d[jp] <= min_diff and ok[jp] == 0:
   25725             :  *                     if d[jp] < min_diff:
   25726             :  */
   25727      131098 :       __pyx_t_1 = __pyx_v_nc;
   25728      131098 :       __pyx_t_2 = __pyx_t_1;
   25729      131098 :       for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
   25730      129800 :         __pyx_v_jp = __pyx_t_3;
   25731             : 
   25732             :         /* "scipy/sparse/csgraph/_matching.pyx":801
   25733             :  * 
   25734             :  *             for jp in range(nc):
   25735             :  *                 if d[jp] != INFINITY and d[jp] <= min_diff and ok[jp] == 0:             # <<<<<<<<<<<<<<
   25736             :  *                     if d[jp] < min_diff:
   25737             :  *                         td1 = -1
   25738             :  */
   25739      129800 :         __pyx_t_6 = __pyx_v_jp;
   25740      129800 :         __pyx_t_11 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_d.data + __pyx_t_6 * __pyx_v_d.strides[0]) ))) != INFINITY);
   25741      129800 :         if (__pyx_t_11) {
   25742       85911 :         } else {
   25743       43889 :           __pyx_t_7 = __pyx_t_11;
   25744       43889 :           goto __pyx_L27_bool_binop_done;
   25745             :         }
   25746       85911 :         __pyx_t_6 = __pyx_v_jp;
   25747       85911 :         __pyx_t_11 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_d.data + __pyx_t_6 * __pyx_v_d.strides[0]) ))) <= __pyx_v_min_diff);
   25748       85911 :         if (__pyx_t_11) {
   25749       46056 :         } else {
   25750       39855 :           __pyx_t_7 = __pyx_t_11;
   25751       39855 :           goto __pyx_L27_bool_binop_done;
   25752             :         }
   25753       46056 :         __pyx_t_6 = __pyx_v_jp;
   25754       46056 :         __pyx_t_11 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_BTYPE_t *) ( /* dim=0 */ (__pyx_v_ok.data + __pyx_t_6 * __pyx_v_ok.strides[0]) ))) == 0);
   25755       46056 :         __pyx_t_7 = __pyx_t_11;
   25756      129800 :         __pyx_L27_bool_binop_done:;
   25757      129800 :         if (__pyx_t_7) {
   25758             : 
   25759             :           /* "scipy/sparse/csgraph/_matching.pyx":802
   25760             :  *             for jp in range(nc):
   25761             :  *                 if d[jp] != INFINITY and d[jp] <= min_diff and ok[jp] == 0:
   25762             :  *                     if d[jp] < min_diff:             # <<<<<<<<<<<<<<
   25763             :  *                         td1 = -1
   25764             :  *                         min_diff = d[jp]
   25765             :  */
   25766        6130 :           __pyx_t_6 = __pyx_v_jp;
   25767        6130 :           __pyx_t_7 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_d.data + __pyx_t_6 * __pyx_v_d.strides[0]) ))) < __pyx_v_min_diff);
   25768        6130 :           if (__pyx_t_7) {
   25769             : 
   25770             :             /* "scipy/sparse/csgraph/_matching.pyx":803
   25771             :  *                 if d[jp] != INFINITY and d[jp] <= min_diff and ok[jp] == 0:
   25772             :  *                     if d[jp] < min_diff:
   25773             :  *                         td1 = -1             # <<<<<<<<<<<<<<
   25774             :  *                         min_diff = d[jp]
   25775             :  *                     td1 += 1
   25776             :  */
   25777        4857 :             __pyx_v_td1 = -1;
   25778             : 
   25779             :             /* "scipy/sparse/csgraph/_matching.pyx":804
   25780             :  *                     if d[jp] < min_diff:
   25781             :  *                         td1 = -1
   25782             :  *                         min_diff = d[jp]             # <<<<<<<<<<<<<<
   25783             :  *                     td1 += 1
   25784             :  *                     todo[td1] = jp
   25785             :  */
   25786        4857 :             __pyx_t_6 = __pyx_v_jp;
   25787        4857 :             __pyx_v_min_diff = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_d.data + __pyx_t_6 * __pyx_v_d.strides[0]) )));
   25788             : 
   25789             :             /* "scipy/sparse/csgraph/_matching.pyx":802
   25790             :  *             for jp in range(nc):
   25791             :  *                 if d[jp] != INFINITY and d[jp] <= min_diff and ok[jp] == 0:
   25792             :  *                     if d[jp] < min_diff:             # <<<<<<<<<<<<<<
   25793             :  *                         td1 = -1
   25794             :  *                         min_diff = d[jp]
   25795             :  */
   25796             :           }
   25797             : 
   25798             :           /* "scipy/sparse/csgraph/_matching.pyx":805
   25799             :  *                         td1 = -1
   25800             :  *                         min_diff = d[jp]
   25801             :  *                     td1 += 1             # <<<<<<<<<<<<<<
   25802             :  *                     todo[td1] = jp
   25803             :  * 
   25804             :  */
   25805        6130 :           __pyx_v_td1 = (__pyx_v_td1 + 1);
   25806             : 
   25807             :           /* "scipy/sparse/csgraph/_matching.pyx":806
   25808             :  *                         min_diff = d[jp]
   25809             :  *                     td1 += 1
   25810             :  *                     todo[td1] = jp             # <<<<<<<<<<<<<<
   25811             :  * 
   25812             :  *             for hp in range(td1 + 1):
   25813             :  */
   25814        6130 :           __pyx_t_6 = __pyx_v_td1;
   25815        6130 :           *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_todo.data + __pyx_t_6 * __pyx_v_todo.strides[0]) )) = __pyx_v_jp;
   25816             : 
   25817             :           /* "scipy/sparse/csgraph/_matching.pyx":801
   25818             :  * 
   25819             :  *             for jp in range(nc):
   25820             :  *                 if d[jp] != INFINITY and d[jp] <= min_diff and ok[jp] == 0:             # <<<<<<<<<<<<<<
   25821             :  *                     if d[jp] < min_diff:
   25822             :  *                         td1 = -1
   25823             :  */
   25824             :         }
   25825             :       }
   25826             : 
   25827             :       /* "scipy/sparse/csgraph/_matching.pyx":808
   25828             :  *                     todo[td1] = jp
   25829             :  * 
   25830             :  *             for hp in range(td1 + 1):             # <<<<<<<<<<<<<<
   25831             :  *                 j = todo[hp]
   25832             :  *                 if y[j] == -1:
   25833             :  */
   25834        1298 :       __pyx_t_8 = (__pyx_v_td1 + 1);
   25835        1298 :       __pyx_t_9 = __pyx_t_8;
   25836        3407 :       for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_9; __pyx_t_1+=1) {
   25837        2151 :         __pyx_v_hp = __pyx_t_1;
   25838             : 
   25839             :         /* "scipy/sparse/csgraph/_matching.pyx":809
   25840             :  * 
   25841             :  *             for hp in range(td1 + 1):
   25842             :  *                 j = todo[hp]             # <<<<<<<<<<<<<<
   25843             :  *                 if y[j] == -1:
   25844             :  *                     _lapjvsp_update_dual(nc, d, v, todo, last, min_diff)
   25845             :  */
   25846        2151 :         __pyx_t_6 = __pyx_v_hp;
   25847        2151 :         __pyx_v_j = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_todo.data + __pyx_t_6 * __pyx_v_todo.strides[0]) )));
   25848             : 
   25849             :         /* "scipy/sparse/csgraph/_matching.pyx":810
   25850             :  *             for hp in range(td1 + 1):
   25851             :  *                 j = todo[hp]
   25852             :  *                 if y[j] == -1:             # <<<<<<<<<<<<<<
   25853             :  *                     _lapjvsp_update_dual(nc, d, v, todo, last, min_diff)
   25854             :  *                     _lapjvsp_update_assignments(lab, y, x, j, i0)
   25855             :  */
   25856        2151 :         __pyx_t_6 = __pyx_v_j;
   25857        2151 :         __pyx_t_7 = ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_6 * __pyx_v_y.strides[0]) ))) == -1L);
   25858        2151 :         if (__pyx_t_7) {
   25859             : 
   25860             :           /* "scipy/sparse/csgraph/_matching.pyx":811
   25861             :  *                 j = todo[hp]
   25862             :  *                 if y[j] == -1:
   25863             :  *                     _lapjvsp_update_dual(nc, d, v, todo, last, min_diff)             # <<<<<<<<<<<<<<
   25864             :  *                     _lapjvsp_update_assignments(lab, y, x, j, i0)
   25865             :  *                     return td1
   25866             :  */
   25867          42 :           __pyx_t_10 = __pyx_f_5scipy_6sparse_7csgraph_9_matching__lapjvsp_update_dual(__pyx_v_nc, __pyx_v_d, __pyx_v_v, __pyx_v_todo, __pyx_v_last, __pyx_v_min_diff); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 811, __pyx_L1_error)
   25868          42 :           __Pyx_GOTREF(__pyx_t_10);
   25869          84 :           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   25870             : 
   25871             :           /* "scipy/sparse/csgraph/_matching.pyx":812
   25872             :  *                 if y[j] == -1:
   25873             :  *                     _lapjvsp_update_dual(nc, d, v, todo, last, min_diff)
   25874             :  *                     _lapjvsp_update_assignments(lab, y, x, j, i0)             # <<<<<<<<<<<<<<
   25875             :  *                     return td1
   25876             :  *                 ok[j] = 1
   25877             :  */
   25878          84 :           __pyx_t_10 = __pyx_f_5scipy_6sparse_7csgraph_9_matching__lapjvsp_update_assignments(__pyx_v_lab, __pyx_v_y, __pyx_v_x, __pyx_v_j, __pyx_v_i0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 812, __pyx_L1_error)
   25879          42 :           __Pyx_GOTREF(__pyx_t_10);
   25880          84 :           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   25881             : 
   25882             :           /* "scipy/sparse/csgraph/_matching.pyx":813
   25883             :  *                     _lapjvsp_update_dual(nc, d, v, todo, last, min_diff)
   25884             :  *                     _lapjvsp_update_assignments(lab, y, x, j, i0)
   25885             :  *                     return td1             # <<<<<<<<<<<<<<
   25886             :  *                 ok[j] = 1
   25887             :  * 
   25888             :  */
   25889          42 :           __pyx_r = __pyx_v_td1;
   25890          42 :           goto __pyx_L0;
   25891             : 
   25892             :           /* "scipy/sparse/csgraph/_matching.pyx":810
   25893             :  *             for hp in range(td1 + 1):
   25894             :  *                 j = todo[hp]
   25895             :  *                 if y[j] == -1:             # <<<<<<<<<<<<<<
   25896             :  *                     _lapjvsp_update_dual(nc, d, v, todo, last, min_diff)
   25897             :  *                     _lapjvsp_update_assignments(lab, y, x, j, i0)
   25898             :  */
   25899             :         }
   25900             : 
   25901             :         /* "scipy/sparse/csgraph/_matching.pyx":814
   25902             :  *                     _lapjvsp_update_assignments(lab, y, x, j, i0)
   25903             :  *                     return td1
   25904             :  *                 ok[j] = 1             # <<<<<<<<<<<<<<
   25905             :  * 
   25906             :  * 
   25907             :  */
   25908        2109 :         __pyx_t_6 = __pyx_v_j;
   25909        2109 :         *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_BTYPE_t *) ( /* dim=0 */ (__pyx_v_ok.data + __pyx_t_6 * __pyx_v_ok.strides[0]) )) = 1;
   25910             :       }
   25911             : 
   25912             :       /* "scipy/sparse/csgraph/_matching.pyx":794
   25913             :  *                         ok[j] = 1
   25914             :  * 
   25915             :  *         if td1 == -1:             # <<<<<<<<<<<<<<
   25916             :  *             # The original Pascal code uses finite numbers instead of INFINITY
   25917             :  *             # so we need to adjust slightly here.
   25918             :  */
   25919             :     }
   25920             :   }
   25921             : 
   25922             :   /* "scipy/sparse/csgraph/_matching.pyx":725
   25923             :  * @cython.boundscheck(False)
   25924             :  * @cython.wraparound(False)
   25925             :  * cdef ITYPE_t _lapjvsp_single_l(ITYPE_t l, ITYPE_t nc, DTYPE_t[:] d,             # <<<<<<<<<<<<<<
   25926             :  *                                BTYPE_t[:] ok, ITYPE_t[:] free,
   25927             :  *                                ITYPE_t[:] first, ITYPE_t[:] kk,
   25928             :  */
   25929             : 
   25930             :   /* function exit code */
   25931             :   __pyx_r = 0;
   25932             :   goto __pyx_L0;
   25933           0 :   __pyx_L1_error:;
   25934           0 :   __Pyx_XDECREF(__pyx_t_10);
   25935           0 :   __Pyx_AddTraceback("scipy.sparse.csgraph._matching._lapjvsp_single_l", __pyx_clineno, __pyx_lineno, __pyx_filename);
   25936           0 :   __pyx_r = -2;
   25937         190 :   __pyx_L0:;
   25938         190 :   __Pyx_RefNannyFinishContext();
   25939         190 :   return __pyx_r;
   25940             : }
   25941             : 
   25942             : /* "scipy/sparse/csgraph/_matching.pyx":819
   25943             :  * @cython.boundscheck(False)
   25944             :  * @cython.wraparound(False)
   25945             :  * cdef _lapjvsp_update_dual(ITYPE_t nc, DTYPE_t[:] d, DTYPE_t[:] v,             # <<<<<<<<<<<<<<
   25946             :  *                           ITYPE_t[:] todo, ITYPE_t last, DTYPE_t min_diff):
   25947             :  *     cdef ITYPE_t j0
   25948             :  */
   25949             : 
   25950             : static PyObject *__pyx_f_5scipy_6sparse_7csgraph_9_matching__lapjvsp_update_dual(__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_nc, __Pyx_memviewslice __pyx_v_d, __Pyx_memviewslice __pyx_v_v, __Pyx_memviewslice __pyx_v_todo, __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_last, __pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t __pyx_v_min_diff) {
   25951             :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_j0;
   25952             :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_k;
   25953        6436 :   PyObject *__pyx_r = NULL;
   25954             :   __Pyx_RefNannyDeclarations
   25955             :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_1;
   25956             :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_2;
   25957             :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_t_3;
   25958             :   Py_ssize_t __pyx_t_4;
   25959             :   Py_ssize_t __pyx_t_5;
   25960             :   __Pyx_RefNannySetupContext("_lapjvsp_update_dual", 1);
   25961             : 
   25962             :   /* "scipy/sparse/csgraph/_matching.pyx":822
   25963             :  *                           ITYPE_t[:] todo, ITYPE_t last, DTYPE_t min_diff):
   25964             :  *     cdef ITYPE_t j0
   25965             :  *     for k in range(last, nc):             # <<<<<<<<<<<<<<
   25966             :  *         j0 = todo[k]
   25967             :  *         v[j0] += d[j0] - min_diff
   25968             :  */
   25969             :   __pyx_t_1 = __pyx_v_nc;
   25970             :   __pyx_t_2 = __pyx_t_1;
   25971        6436 :   for (__pyx_t_3 = __pyx_v_last; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
   25972        6249 :     __pyx_v_k = __pyx_t_3;
   25973             : 
   25974             :     /* "scipy/sparse/csgraph/_matching.pyx":823
   25975             :  *     cdef ITYPE_t j0
   25976             :  *     for k in range(last, nc):
   25977             :  *         j0 = todo[k]             # <<<<<<<<<<<<<<
   25978             :  *         v[j0] += d[j0] - min_diff
   25979             :  * 
   25980             :  */
   25981        6249 :     __pyx_t_4 = __pyx_v_k;
   25982        6249 :     __pyx_v_j0 = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_todo.data + __pyx_t_4 * __pyx_v_todo.strides[0]) )));
   25983             : 
   25984             :     /* "scipy/sparse/csgraph/_matching.pyx":824
   25985             :  *     for k in range(last, nc):
   25986             :  *         j0 = todo[k]
   25987             :  *         v[j0] += d[j0] - min_diff             # <<<<<<<<<<<<<<
   25988             :  * 
   25989             :  * 
   25990             :  */
   25991        6249 :     __pyx_t_4 = __pyx_v_j0;
   25992        6249 :     __pyx_t_5 = __pyx_v_j0;
   25993        6249 :     *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_5 * __pyx_v_v.strides[0]) )) += ((*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t *) ( /* dim=0 */ (__pyx_v_d.data + __pyx_t_4 * __pyx_v_d.strides[0]) ))) - __pyx_v_min_diff);
   25994             :   }
   25995             : 
   25996             :   /* "scipy/sparse/csgraph/_matching.pyx":819
   25997             :  * @cython.boundscheck(False)
   25998             :  * @cython.wraparound(False)
   25999             :  * cdef _lapjvsp_update_dual(ITYPE_t nc, DTYPE_t[:] d, DTYPE_t[:] v,             # <<<<<<<<<<<<<<
   26000             :  *                           ITYPE_t[:] todo, ITYPE_t last, DTYPE_t min_diff):
   26001             :  *     cdef ITYPE_t j0
   26002             :  */
   26003             : 
   26004             :   /* function exit code */
   26005         187 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   26006         187 :   __Pyx_XGIVEREF(__pyx_r);
   26007         187 :   __Pyx_RefNannyFinishContext();
   26008         187 :   return __pyx_r;
   26009             : }
   26010             : 
   26011             : /* "scipy/sparse/csgraph/_matching.pyx":829
   26012             :  * @cython.boundscheck(False)
   26013             :  * @cython.wraparound(False)
   26014             :  * cdef _lapjvsp_update_assignments(ITYPE_t[:] lab, ITYPE_t[:] y, ITYPE_t[:] x,             # <<<<<<<<<<<<<<
   26015             :  *                                  ITYPE_t j, ITYPE_t i0):
   26016             :  *     cdef ITYPE_t i, k
   26017             :  */
   26018             : 
   26019         190 : static PyObject *__pyx_f_5scipy_6sparse_7csgraph_9_matching__lapjvsp_update_assignments(__Pyx_memviewslice __pyx_v_lab, __Pyx_memviewslice __pyx_v_y, __Pyx_memviewslice __pyx_v_x, __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_j, __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_i0) {
   26020         190 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_i;
   26021         190 :   __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t __pyx_v_k;
   26022         190 :   PyObject *__pyx_r = NULL;
   26023             :   __Pyx_RefNannyDeclarations
   26024        1435 :   Py_ssize_t __pyx_t_1;
   26025        1435 :   int __pyx_t_2;
   26026        1435 :   __Pyx_RefNannySetupContext("_lapjvsp_update_assignments", 1);
   26027             : 
   26028             :   /* "scipy/sparse/csgraph/_matching.pyx":832
   26029             :  *                                  ITYPE_t j, ITYPE_t i0):
   26030             :  *     cdef ITYPE_t i, k
   26031             :  *     while True:             # <<<<<<<<<<<<<<
   26032             :  *         i = lab[j]
   26033             :  *         y[j] = i
   26034             :  */
   26035        1435 :   while (1) {
   26036             : 
   26037             :     /* "scipy/sparse/csgraph/_matching.pyx":833
   26038             :  *     cdef ITYPE_t i, k
   26039             :  *     while True:
   26040             :  *         i = lab[j]             # <<<<<<<<<<<<<<
   26041             :  *         y[j] = i
   26042             :  *         k = j
   26043             :  */
   26044        1435 :     __pyx_t_1 = __pyx_v_j;
   26045        1435 :     __pyx_v_i = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_lab.data + __pyx_t_1 * __pyx_v_lab.strides[0]) )));
   26046             : 
   26047             :     /* "scipy/sparse/csgraph/_matching.pyx":834
   26048             :  *     while True:
   26049             :  *         i = lab[j]
   26050             :  *         y[j] = i             # <<<<<<<<<<<<<<
   26051             :  *         k = j
   26052             :  *         j = x[i]
   26053             :  */
   26054        1435 :     __pyx_t_1 = __pyx_v_j;
   26055        1435 :     *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_1 * __pyx_v_y.strides[0]) )) = __pyx_v_i;
   26056             : 
   26057             :     /* "scipy/sparse/csgraph/_matching.pyx":835
   26058             :  *         i = lab[j]
   26059             :  *         y[j] = i
   26060             :  *         k = j             # <<<<<<<<<<<<<<
   26061             :  *         j = x[i]
   26062             :  *         x[i] = k
   26063             :  */
   26064        1435 :     __pyx_v_k = __pyx_v_j;
   26065             : 
   26066             :     /* "scipy/sparse/csgraph/_matching.pyx":836
   26067             :  *         y[j] = i
   26068             :  *         k = j
   26069             :  *         j = x[i]             # <<<<<<<<<<<<<<
   26070             :  *         x[i] = k
   26071             :  *         if i == i0:
   26072             :  */
   26073        1435 :     __pyx_t_1 = __pyx_v_i;
   26074        1435 :     __pyx_v_j = (*((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_1 * __pyx_v_x.strides[0]) )));
   26075             : 
   26076             :     /* "scipy/sparse/csgraph/_matching.pyx":837
   26077             :  *         k = j
   26078             :  *         j = x[i]
   26079             :  *         x[i] = k             # <<<<<<<<<<<<<<
   26080             :  *         if i == i0:
   26081             :  *             return
   26082             :  */
   26083        1435 :     __pyx_t_1 = __pyx_v_i;
   26084        1435 :     *((__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_1 * __pyx_v_x.strides[0]) )) = __pyx_v_k;
   26085             : 
   26086             :     /* "scipy/sparse/csgraph/_matching.pyx":838
   26087             :  *         j = x[i]
   26088             :  *         x[i] = k
   26089             :  *         if i == i0:             # <<<<<<<<<<<<<<
   26090             :  *             return
   26091             :  */
   26092        1435 :     __pyx_t_2 = (__pyx_v_i == __pyx_v_i0);
   26093        1435 :     if (__pyx_t_2) {
   26094             : 
   26095             :       /* "scipy/sparse/csgraph/_matching.pyx":839
   26096             :  *         x[i] = k
   26097             :  *         if i == i0:
   26098             :  *             return             # <<<<<<<<<<<<<<
   26099             :  */
   26100         190 :       __Pyx_XDECREF(__pyx_r);
   26101         190 :       __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   26102         190 :       goto __pyx_L0;
   26103             : 
   26104             :       /* "scipy/sparse/csgraph/_matching.pyx":838
   26105             :  *         j = x[i]
   26106             :  *         x[i] = k
   26107             :  *         if i == i0:             # <<<<<<<<<<<<<<
   26108             :  *             return
   26109             :  */
   26110             :     }
   26111             :   }
   26112             : 
   26113             :   /* "scipy/sparse/csgraph/_matching.pyx":829
   26114             :  * @cython.boundscheck(False)
   26115             :  * @cython.wraparound(False)
   26116             :  * cdef _lapjvsp_update_assignments(ITYPE_t[:] lab, ITYPE_t[:] y, ITYPE_t[:] x,             # <<<<<<<<<<<<<<
   26117             :  *                                  ITYPE_t j, ITYPE_t i0):
   26118             :  *     cdef ITYPE_t i, k
   26119             :  */
   26120             : 
   26121             :   /* function exit code */
   26122             :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   26123         190 :   __pyx_L0:;
   26124         190 :   __Pyx_XGIVEREF(__pyx_r);
   26125         190 :   __Pyx_RefNannyFinishContext();
   26126         190 :   return __pyx_r;
   26127             : }
   26128             : static struct __pyx_vtabstruct_array __pyx_vtable_array;
   26129             : 
   26130           0 : static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
   26131           0 :   struct __pyx_array_obj *p;
   26132           0 :   PyObject *o;
   26133             :   #if CYTHON_COMPILING_IN_LIMITED_API
   26134             :   allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
   26135             :   o = alloc_func(t, 0);
   26136             :   #else
   26137           0 :   if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
   26138           0 :     o = (*t->tp_alloc)(t, 0);
   26139             :   } else {
   26140           0 :     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
   26141             :   }
   26142           0 :   if (unlikely(!o)) return 0;
   26143             :   #endif
   26144           0 :   p = ((struct __pyx_array_obj *)o);
   26145           0 :   p->__pyx_vtab = __pyx_vtabptr_array;
   26146           0 :   p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
   26147           0 :   p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
   26148           0 :   if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
   26149             :   return o;
   26150           0 :   bad:
   26151           0 :   Py_DECREF(o); o = 0;
   26152             :   return NULL;
   26153             : }
   26154             : 
   26155           0 : static void __pyx_tp_dealloc_array(PyObject *o) {
   26156           0 :   struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
   26157             :   #if CYTHON_USE_TP_FINALIZE
   26158           0 :   if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
   26159           0 :     if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_array) {
   26160           0 :       if (PyObject_CallFinalizerFromDealloc(o)) return;
   26161             :     }
   26162             :   }
   26163             :   #endif
   26164             :   {
   26165           0 :     PyObject *etype, *eval, *etb;
   26166           0 :     PyErr_Fetch(&etype, &eval, &etb);
   26167           0 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
   26168           0 :     __pyx_array___dealloc__(o);
   26169           0 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
   26170           0 :     PyErr_Restore(etype, eval, etb);
   26171             :   }
   26172           0 :   Py_CLEAR(p->mode);
   26173           0 :   Py_CLEAR(p->_format);
   26174             :   #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
   26175           0 :   (*Py_TYPE(o)->tp_free)(o);
   26176             :   #else
   26177             :   {
   26178             :     freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
   26179             :     if (tp_free) tp_free(o);
   26180             :   }
   26181             :   #endif
   26182             : }
   26183           0 : static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
   26184           0 :   PyObject *r;
   26185           0 :   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
   26186           0 :   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
   26187           0 :   Py_DECREF(x);
   26188             :   return r;
   26189             : }
   26190             : 
   26191           0 : static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
   26192           0 :   if (v) {
   26193           0 :     return __pyx_array___setitem__(o, i, v);
   26194             :   }
   26195             :   else {
   26196           0 :     __Pyx_TypeName o_type_name;
   26197           0 :     o_type_name = __Pyx_PyType_GetName(Py_TYPE(o));
   26198           0 :     PyErr_Format(PyExc_NotImplementedError,
   26199             :       "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
   26200           0 :     __Pyx_DECREF_TypeName(o_type_name);
   26201           0 :     return -1;
   26202             :   }
   26203             : }
   26204             : 
   26205           0 : static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
   26206           0 :   PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
   26207           0 :   if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
   26208           0 :     PyErr_Clear();
   26209           0 :     v = __pyx_array___getattr__(o, n);
   26210             :   }
   26211           0 :   return v;
   26212             : }
   26213             : 
   26214           0 : static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
   26215           0 :   return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
   26216             : }
   26217             : 
   26218             : static PyMethodDef __pyx_methods_array[] = {
   26219             :   {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
   26220             :   {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   26221             :   {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   26222             :   {0, 0, 0, 0}
   26223             : };
   26224             : 
   26225             : static struct PyGetSetDef __pyx_getsets_array[] = {
   26226             :   {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0},
   26227             :   {0, 0, 0, 0, 0}
   26228             : };
   26229             : #if CYTHON_USE_TYPE_SPECS
   26230             : #if !CYTHON_COMPILING_IN_LIMITED_API
   26231             : 
   26232             : static PyBufferProcs __pyx_tp_as_buffer_array = {
   26233             :   #if PY_MAJOR_VERSION < 3
   26234             :   0, /*bf_getreadbuffer*/
   26235             :   #endif
   26236             :   #if PY_MAJOR_VERSION < 3
   26237             :   0, /*bf_getwritebuffer*/
   26238             :   #endif
   26239             :   #if PY_MAJOR_VERSION < 3
   26240             :   0, /*bf_getsegcount*/
   26241             :   #endif
   26242             :   #if PY_MAJOR_VERSION < 3
   26243             :   0, /*bf_getcharbuffer*/
   26244             :   #endif
   26245             :   __pyx_array_getbuffer, /*bf_getbuffer*/
   26246             :   0, /*bf_releasebuffer*/
   26247             : };
   26248             : #endif
   26249             : static PyType_Slot __pyx_type___pyx_array_slots[] = {
   26250             :   {Py_tp_dealloc, (void *)__pyx_tp_dealloc_array},
   26251             :   {Py_sq_length, (void *)__pyx_array___len__},
   26252             :   {Py_sq_item, (void *)__pyx_sq_item_array},
   26253             :   {Py_mp_length, (void *)__pyx_array___len__},
   26254             :   {Py_mp_subscript, (void *)__pyx_array___getitem__},
   26255             :   {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_array},
   26256             :   {Py_tp_getattro, (void *)__pyx_tp_getattro_array},
   26257             :   #if defined(Py_bf_getbuffer)
   26258             :   {Py_bf_getbuffer, (void *)__pyx_array_getbuffer},
   26259             :   #endif
   26260             :   {Py_tp_methods, (void *)__pyx_methods_array},
   26261             :   {Py_tp_getset, (void *)__pyx_getsets_array},
   26262             :   {Py_tp_new, (void *)__pyx_tp_new_array},
   26263             :   {0, 0},
   26264             : };
   26265             : static PyType_Spec __pyx_type___pyx_array_spec = {
   26266             :   "scipy.sparse.csgraph._matching.array",
   26267             :   sizeof(struct __pyx_array_obj),
   26268             :   0,
   26269             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE,
   26270             :   __pyx_type___pyx_array_slots,
   26271             : };
   26272             : #else
   26273             : 
   26274             : static PySequenceMethods __pyx_tp_as_sequence_array = {
   26275             :   __pyx_array___len__, /*sq_length*/
   26276             :   0, /*sq_concat*/
   26277             :   0, /*sq_repeat*/
   26278             :   __pyx_sq_item_array, /*sq_item*/
   26279             :   0, /*sq_slice*/
   26280             :   0, /*sq_ass_item*/
   26281             :   0, /*sq_ass_slice*/
   26282             :   0, /*sq_contains*/
   26283             :   0, /*sq_inplace_concat*/
   26284             :   0, /*sq_inplace_repeat*/
   26285             : };
   26286             : 
   26287             : static PyMappingMethods __pyx_tp_as_mapping_array = {
   26288             :   __pyx_array___len__, /*mp_length*/
   26289             :   __pyx_array___getitem__, /*mp_subscript*/
   26290             :   __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
   26291             : };
   26292             : 
   26293             : static PyBufferProcs __pyx_tp_as_buffer_array = {
   26294             :   #if PY_MAJOR_VERSION < 3
   26295             :   0, /*bf_getreadbuffer*/
   26296             :   #endif
   26297             :   #if PY_MAJOR_VERSION < 3
   26298             :   0, /*bf_getwritebuffer*/
   26299             :   #endif
   26300             :   #if PY_MAJOR_VERSION < 3
   26301             :   0, /*bf_getsegcount*/
   26302             :   #endif
   26303             :   #if PY_MAJOR_VERSION < 3
   26304             :   0, /*bf_getcharbuffer*/
   26305             :   #endif
   26306             :   __pyx_array_getbuffer, /*bf_getbuffer*/
   26307             :   0, /*bf_releasebuffer*/
   26308             : };
   26309             : 
   26310             : static PyTypeObject __pyx_type___pyx_array = {
   26311             :   PyVarObject_HEAD_INIT(0, 0)
   26312             :   "scipy.sparse.csgraph._matching.""array", /*tp_name*/
   26313             :   sizeof(struct __pyx_array_obj), /*tp_basicsize*/
   26314             :   0, /*tp_itemsize*/
   26315             :   __pyx_tp_dealloc_array, /*tp_dealloc*/
   26316             :   #if PY_VERSION_HEX < 0x030800b4
   26317             :   0, /*tp_print*/
   26318             :   #endif
   26319             :   #if PY_VERSION_HEX >= 0x030800b4
   26320             :   0, /*tp_vectorcall_offset*/
   26321             :   #endif
   26322             :   0, /*tp_getattr*/
   26323             :   0, /*tp_setattr*/
   26324             :   #if PY_MAJOR_VERSION < 3
   26325             :   0, /*tp_compare*/
   26326             :   #endif
   26327             :   #if PY_MAJOR_VERSION >= 3
   26328             :   0, /*tp_as_async*/
   26329             :   #endif
   26330             :   0, /*tp_repr*/
   26331             :   0, /*tp_as_number*/
   26332             :   &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
   26333             :   &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
   26334             :   0, /*tp_hash*/
   26335             :   0, /*tp_call*/
   26336             :   0, /*tp_str*/
   26337             :   __pyx_tp_getattro_array, /*tp_getattro*/
   26338             :   0, /*tp_setattro*/
   26339             :   &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
   26340             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE, /*tp_flags*/
   26341             :   0, /*tp_doc*/
   26342             :   0, /*tp_traverse*/
   26343             :   0, /*tp_clear*/
   26344             :   0, /*tp_richcompare*/
   26345             :   0, /*tp_weaklistoffset*/
   26346             :   0, /*tp_iter*/
   26347             :   0, /*tp_iternext*/
   26348             :   __pyx_methods_array, /*tp_methods*/
   26349             :   0, /*tp_members*/
   26350             :   __pyx_getsets_array, /*tp_getset*/
   26351             :   0, /*tp_base*/
   26352             :   0, /*tp_dict*/
   26353             :   0, /*tp_descr_get*/
   26354             :   0, /*tp_descr_set*/
   26355             :   #if !CYTHON_USE_TYPE_SPECS
   26356             :   0, /*tp_dictoffset*/
   26357             :   #endif
   26358             :   0, /*tp_init*/
   26359             :   0, /*tp_alloc*/
   26360             :   __pyx_tp_new_array, /*tp_new*/
   26361             :   0, /*tp_free*/
   26362             :   0, /*tp_is_gc*/
   26363             :   0, /*tp_bases*/
   26364             :   0, /*tp_mro*/
   26365             :   0, /*tp_cache*/
   26366             :   0, /*tp_subclasses*/
   26367             :   0, /*tp_weaklist*/
   26368             :   0, /*tp_del*/
   26369             :   0, /*tp_version_tag*/
   26370             :   #if PY_VERSION_HEX >= 0x030400a1
   26371             :   #if CYTHON_USE_TP_FINALIZE
   26372             :   0, /*tp_finalize*/
   26373             :   #else
   26374             :   NULL, /*tp_finalize*/
   26375             :   #endif
   26376             :   #endif
   26377             :   #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   26378             :   0, /*tp_vectorcall*/
   26379             :   #endif
   26380             :   #if __PYX_NEED_TP_PRINT_SLOT == 1
   26381             :   0, /*tp_print*/
   26382             :   #endif
   26383             :   #if PY_VERSION_HEX >= 0x030C0000
   26384             :   0, /*tp_watched*/
   26385             :   #endif
   26386             :   #if PY_VERSION_HEX >= 0x030d00A4
   26387             :   0, /*tp_versions_used*/
   26388             :   #endif
   26389             :   #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   26390             :   0, /*tp_pypy_flags*/
   26391             :   #endif
   26392             : };
   26393             : #endif
   26394             : 
   26395          15 : static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
   26396          15 :   struct __pyx_MemviewEnum_obj *p;
   26397          15 :   PyObject *o;
   26398             :   #if CYTHON_COMPILING_IN_LIMITED_API
   26399             :   allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
   26400             :   o = alloc_func(t, 0);
   26401             :   #else
   26402          15 :   if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
   26403          15 :     o = (*t->tp_alloc)(t, 0);
   26404             :   } else {
   26405           0 :     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
   26406             :   }
   26407          15 :   if (unlikely(!o)) return 0;
   26408             :   #endif
   26409          15 :   p = ((struct __pyx_MemviewEnum_obj *)o);
   26410          15 :   p->name = Py_None; Py_INCREF(Py_None);
   26411             :   return o;
   26412             : }
   26413             : 
   26414           0 : static void __pyx_tp_dealloc_Enum(PyObject *o) {
   26415           0 :   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
   26416             :   #if CYTHON_USE_TP_FINALIZE
   26417           0 :   if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
   26418           0 :     if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_Enum) {
   26419           0 :       if (PyObject_CallFinalizerFromDealloc(o)) return;
   26420             :     }
   26421             :   }
   26422             :   #endif
   26423           0 :   PyObject_GC_UnTrack(o);
   26424           0 :   Py_CLEAR(p->name);
   26425             :   #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
   26426           0 :   (*Py_TYPE(o)->tp_free)(o);
   26427             :   #else
   26428             :   {
   26429             :     freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
   26430             :     if (tp_free) tp_free(o);
   26431             :   }
   26432             :   #endif
   26433             : }
   26434             : 
   26435         725 : static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
   26436         725 :   int e;
   26437         725 :   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
   26438         725 :   if (p->name) {
   26439         725 :     e = (*v)(p->name, a); if (e) return e;
   26440             :   }
   26441             :   return 0;
   26442             : }
   26443             : 
   26444           0 : static int __pyx_tp_clear_Enum(PyObject *o) {
   26445           0 :   PyObject* tmp;
   26446           0 :   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
   26447           0 :   tmp = ((PyObject*)p->name);
   26448           0 :   p->name = Py_None; Py_INCREF(Py_None);
   26449           0 :   Py_XDECREF(tmp);
   26450           0 :   return 0;
   26451             : }
   26452             : 
   26453           0 : static PyObject *__pyx_specialmethod___pyx_MemviewEnum___repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
   26454           0 :   return __pyx_MemviewEnum___repr__(self);
   26455             : }
   26456             : 
   26457             : static PyMethodDef __pyx_methods_Enum[] = {
   26458             :   {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_MemviewEnum___repr__, METH_NOARGS|METH_COEXIST, 0},
   26459             :   {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   26460             :   {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   26461             :   {0, 0, 0, 0}
   26462             : };
   26463             : #if CYTHON_USE_TYPE_SPECS
   26464             : static PyType_Slot __pyx_type___pyx_MemviewEnum_slots[] = {
   26465             :   {Py_tp_dealloc, (void *)__pyx_tp_dealloc_Enum},
   26466             :   {Py_tp_repr, (void *)__pyx_MemviewEnum___repr__},
   26467             :   {Py_tp_traverse, (void *)__pyx_tp_traverse_Enum},
   26468             :   {Py_tp_clear, (void *)__pyx_tp_clear_Enum},
   26469             :   {Py_tp_methods, (void *)__pyx_methods_Enum},
   26470             :   {Py_tp_init, (void *)__pyx_MemviewEnum___init__},
   26471             :   {Py_tp_new, (void *)__pyx_tp_new_Enum},
   26472             :   {0, 0},
   26473             : };
   26474             : static PyType_Spec __pyx_type___pyx_MemviewEnum_spec = {
   26475             :   "scipy.sparse.csgraph._matching.Enum",
   26476             :   sizeof(struct __pyx_MemviewEnum_obj),
   26477             :   0,
   26478             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
   26479             :   __pyx_type___pyx_MemviewEnum_slots,
   26480             : };
   26481             : #else
   26482             : 
   26483             : static PyTypeObject __pyx_type___pyx_MemviewEnum = {
   26484             :   PyVarObject_HEAD_INIT(0, 0)
   26485             :   "scipy.sparse.csgraph._matching.""Enum", /*tp_name*/
   26486             :   sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
   26487             :   0, /*tp_itemsize*/
   26488             :   __pyx_tp_dealloc_Enum, /*tp_dealloc*/
   26489             :   #if PY_VERSION_HEX < 0x030800b4
   26490             :   0, /*tp_print*/
   26491             :   #endif
   26492             :   #if PY_VERSION_HEX >= 0x030800b4
   26493             :   0, /*tp_vectorcall_offset*/
   26494             :   #endif
   26495             :   0, /*tp_getattr*/
   26496             :   0, /*tp_setattr*/
   26497             :   #if PY_MAJOR_VERSION < 3
   26498             :   0, /*tp_compare*/
   26499             :   #endif
   26500             :   #if PY_MAJOR_VERSION >= 3
   26501             :   0, /*tp_as_async*/
   26502             :   #endif
   26503             :   __pyx_MemviewEnum___repr__, /*tp_repr*/
   26504             :   0, /*tp_as_number*/
   26505             :   0, /*tp_as_sequence*/
   26506             :   0, /*tp_as_mapping*/
   26507             :   0, /*tp_hash*/
   26508             :   0, /*tp_call*/
   26509             :   0, /*tp_str*/
   26510             :   0, /*tp_getattro*/
   26511             :   0, /*tp_setattro*/
   26512             :   0, /*tp_as_buffer*/
   26513             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
   26514             :   0, /*tp_doc*/
   26515             :   __pyx_tp_traverse_Enum, /*tp_traverse*/
   26516             :   __pyx_tp_clear_Enum, /*tp_clear*/
   26517             :   0, /*tp_richcompare*/
   26518             :   0, /*tp_weaklistoffset*/
   26519             :   0, /*tp_iter*/
   26520             :   0, /*tp_iternext*/
   26521             :   __pyx_methods_Enum, /*tp_methods*/
   26522             :   0, /*tp_members*/
   26523             :   0, /*tp_getset*/
   26524             :   0, /*tp_base*/
   26525             :   0, /*tp_dict*/
   26526             :   0, /*tp_descr_get*/
   26527             :   0, /*tp_descr_set*/
   26528             :   #if !CYTHON_USE_TYPE_SPECS
   26529             :   0, /*tp_dictoffset*/
   26530             :   #endif
   26531             :   __pyx_MemviewEnum___init__, /*tp_init*/
   26532             :   0, /*tp_alloc*/
   26533             :   __pyx_tp_new_Enum, /*tp_new*/
   26534             :   0, /*tp_free*/
   26535             :   0, /*tp_is_gc*/
   26536             :   0, /*tp_bases*/
   26537             :   0, /*tp_mro*/
   26538             :   0, /*tp_cache*/
   26539             :   0, /*tp_subclasses*/
   26540             :   0, /*tp_weaklist*/
   26541             :   0, /*tp_del*/
   26542             :   0, /*tp_version_tag*/
   26543             :   #if PY_VERSION_HEX >= 0x030400a1
   26544             :   #if CYTHON_USE_TP_FINALIZE
   26545             :   0, /*tp_finalize*/
   26546             :   #else
   26547             :   NULL, /*tp_finalize*/
   26548             :   #endif
   26549             :   #endif
   26550             :   #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   26551             :   0, /*tp_vectorcall*/
   26552             :   #endif
   26553             :   #if __PYX_NEED_TP_PRINT_SLOT == 1
   26554             :   0, /*tp_print*/
   26555             :   #endif
   26556             :   #if PY_VERSION_HEX >= 0x030C0000
   26557             :   0, /*tp_watched*/
   26558             :   #endif
   26559             :   #if PY_VERSION_HEX >= 0x030d00A4
   26560             :   0, /*tp_versions_used*/
   26561             :   #endif
   26562             :   #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   26563             :   0, /*tp_pypy_flags*/
   26564             :   #endif
   26565             : };
   26566             : #endif
   26567             : static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
   26568             : 
   26569        2302 : static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
   26570        2302 :   struct __pyx_memoryview_obj *p;
   26571        2302 :   PyObject *o;
   26572             :   #if CYTHON_COMPILING_IN_LIMITED_API
   26573             :   allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
   26574             :   o = alloc_func(t, 0);
   26575             :   #else
   26576        2302 :   if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
   26577        2302 :     o = (*t->tp_alloc)(t, 0);
   26578             :   } else {
   26579           0 :     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
   26580             :   }
   26581        2302 :   if (unlikely(!o)) return 0;
   26582             :   #endif
   26583        2302 :   p = ((struct __pyx_memoryview_obj *)o);
   26584        2302 :   p->__pyx_vtab = __pyx_vtabptr_memoryview;
   26585        2302 :   p->obj = Py_None; Py_INCREF(Py_None);
   26586        2302 :   p->_size = Py_None; Py_INCREF(Py_None);
   26587        2302 :   p->_array_interface = Py_None; Py_INCREF(Py_None);
   26588        2302 :   p->view.obj = NULL;
   26589        2302 :   if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
   26590             :   return o;
   26591           0 :   bad:
   26592           0 :   Py_DECREF(o); o = 0;
   26593             :   return NULL;
   26594             : }
   26595             : 
   26596        2302 : static void __pyx_tp_dealloc_memoryview(PyObject *o) {
   26597        2302 :   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
   26598             :   #if CYTHON_USE_TP_FINALIZE
   26599        2302 :   if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
   26600           0 :     if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_memoryview) {
   26601           0 :       if (PyObject_CallFinalizerFromDealloc(o)) return;
   26602             :     }
   26603             :   }
   26604             :   #endif
   26605        2302 :   PyObject_GC_UnTrack(o);
   26606             :   {
   26607        2302 :     PyObject *etype, *eval, *etb;
   26608        2302 :     PyErr_Fetch(&etype, &eval, &etb);
   26609        2302 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
   26610        2302 :     __pyx_memoryview___dealloc__(o);
   26611        2302 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
   26612        2302 :     PyErr_Restore(etype, eval, etb);
   26613             :   }
   26614        2302 :   Py_CLEAR(p->obj);
   26615        2302 :   Py_CLEAR(p->_size);
   26616        2302 :   Py_CLEAR(p->_array_interface);
   26617             :   #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
   26618        2302 :   (*Py_TYPE(o)->tp_free)(o);
   26619             :   #else
   26620             :   {
   26621             :     freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
   26622             :     if (tp_free) tp_free(o);
   26623             :   }
   26624             :   #endif
   26625             : }
   26626             : 
   26627           0 : static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
   26628           0 :   int e;
   26629           0 :   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
   26630           0 :   if (p->obj) {
   26631           0 :     e = (*v)(p->obj, a); if (e) return e;
   26632             :   }
   26633           0 :   if (p->_size) {
   26634           0 :     e = (*v)(p->_size, a); if (e) return e;
   26635             :   }
   26636           0 :   if (p->_array_interface) {
   26637           0 :     e = (*v)(p->_array_interface, a); if (e) return e;
   26638             :   }
   26639           0 :   if (p->view.obj) {
   26640           0 :     e = (*v)(p->view.obj, a); if (e) return e;
   26641             :   }
   26642             :   return 0;
   26643             : }
   26644             : 
   26645           0 : static int __pyx_tp_clear_memoryview(PyObject *o) {
   26646           0 :   PyObject* tmp;
   26647           0 :   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
   26648           0 :   tmp = ((PyObject*)p->obj);
   26649           0 :   p->obj = Py_None; Py_INCREF(Py_None);
   26650           0 :   Py_XDECREF(tmp);
   26651           0 :   tmp = ((PyObject*)p->_size);
   26652           0 :   p->_size = Py_None; Py_INCREF(Py_None);
   26653           0 :   Py_XDECREF(tmp);
   26654           0 :   tmp = ((PyObject*)p->_array_interface);
   26655           0 :   p->_array_interface = Py_None; Py_INCREF(Py_None);
   26656           0 :   Py_XDECREF(tmp);
   26657           0 :   Py_CLEAR(p->view.obj);
   26658           0 :   return 0;
   26659             : }
   26660           0 : static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
   26661           0 :   PyObject *r;
   26662           0 :   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
   26663           0 :   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
   26664           0 :   Py_DECREF(x);
   26665             :   return r;
   26666             : }
   26667             : 
   26668           0 : static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
   26669           0 :   if (v) {
   26670           0 :     return __pyx_memoryview___setitem__(o, i, v);
   26671             :   }
   26672             :   else {
   26673           0 :     __Pyx_TypeName o_type_name;
   26674           0 :     o_type_name = __Pyx_PyType_GetName(Py_TYPE(o));
   26675           0 :     PyErr_Format(PyExc_NotImplementedError,
   26676             :       "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
   26677           0 :     __Pyx_DECREF_TypeName(o_type_name);
   26678           0 :     return -1;
   26679             :   }
   26680             : }
   26681             : 
   26682           0 : static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
   26683           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
   26684             : }
   26685             : 
   26686           0 : static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
   26687           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
   26688             : }
   26689             : 
   26690           0 : static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
   26691           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
   26692             : }
   26693             : 
   26694           0 : static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
   26695           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
   26696             : }
   26697             : 
   26698           0 : static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
   26699           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
   26700             : }
   26701             : 
   26702           0 : static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
   26703           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
   26704             : }
   26705             : 
   26706           0 : static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
   26707           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
   26708             : }
   26709             : 
   26710           0 : static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
   26711           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
   26712             : }
   26713             : 
   26714           0 : static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
   26715           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
   26716             : }
   26717             : 
   26718           0 : static PyObject *__pyx_specialmethod___pyx_memoryview___repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
   26719           0 :   return __pyx_memoryview___repr__(self);
   26720             : }
   26721             : 
   26722             : static PyMethodDef __pyx_methods_memoryview[] = {
   26723             :   {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_memoryview___repr__, METH_NOARGS|METH_COEXIST, 0},
   26724             :   {"is_c_contig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_c_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   26725             :   {"is_f_contig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_f_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   26726             :   {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   26727             :   {"copy_fortran", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy_fortran, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   26728             :   {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   26729             :   {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   26730             :   {0, 0, 0, 0}
   26731             : };
   26732             : 
   26733             : static struct PyGetSetDef __pyx_getsets_memoryview[] = {
   26734             :   {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0},
   26735             :   {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0},
   26736             :   {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0},
   26737             :   {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0},
   26738             :   {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0},
   26739             :   {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0},
   26740             :   {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0},
   26741             :   {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0},
   26742             :   {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0},
   26743             :   {0, 0, 0, 0, 0}
   26744             : };
   26745             : #if CYTHON_USE_TYPE_SPECS
   26746             : #if !CYTHON_COMPILING_IN_LIMITED_API
   26747             : 
   26748             : static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
   26749             :   #if PY_MAJOR_VERSION < 3
   26750             :   0, /*bf_getreadbuffer*/
   26751             :   #endif
   26752             :   #if PY_MAJOR_VERSION < 3
   26753             :   0, /*bf_getwritebuffer*/
   26754             :   #endif
   26755             :   #if PY_MAJOR_VERSION < 3
   26756             :   0, /*bf_getsegcount*/
   26757             :   #endif
   26758             :   #if PY_MAJOR_VERSION < 3
   26759             :   0, /*bf_getcharbuffer*/
   26760             :   #endif
   26761             :   __pyx_memoryview_getbuffer, /*bf_getbuffer*/
   26762             :   0, /*bf_releasebuffer*/
   26763             : };
   26764             : #endif
   26765             : static PyType_Slot __pyx_type___pyx_memoryview_slots[] = {
   26766             :   {Py_tp_dealloc, (void *)__pyx_tp_dealloc_memoryview},
   26767             :   {Py_tp_repr, (void *)__pyx_memoryview___repr__},
   26768             :   {Py_sq_length, (void *)__pyx_memoryview___len__},
   26769             :   {Py_sq_item, (void *)__pyx_sq_item_memoryview},
   26770             :   {Py_mp_length, (void *)__pyx_memoryview___len__},
   26771             :   {Py_mp_subscript, (void *)__pyx_memoryview___getitem__},
   26772             :   {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_memoryview},
   26773             :   {Py_tp_str, (void *)__pyx_memoryview___str__},
   26774             :   #if defined(Py_bf_getbuffer)
   26775             :   {Py_bf_getbuffer, (void *)__pyx_memoryview_getbuffer},
   26776             :   #endif
   26777             :   {Py_tp_traverse, (void *)__pyx_tp_traverse_memoryview},
   26778             :   {Py_tp_clear, (void *)__pyx_tp_clear_memoryview},
   26779             :   {Py_tp_methods, (void *)__pyx_methods_memoryview},
   26780             :   {Py_tp_getset, (void *)__pyx_getsets_memoryview},
   26781             :   {Py_tp_new, (void *)__pyx_tp_new_memoryview},
   26782             :   {0, 0},
   26783             : };
   26784             : static PyType_Spec __pyx_type___pyx_memoryview_spec = {
   26785             :   "scipy.sparse.csgraph._matching.memoryview",
   26786             :   sizeof(struct __pyx_memoryview_obj),
   26787             :   0,
   26788             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
   26789             :   __pyx_type___pyx_memoryview_slots,
   26790             : };
   26791             : #else
   26792             : 
   26793             : static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
   26794             :   __pyx_memoryview___len__, /*sq_length*/
   26795             :   0, /*sq_concat*/
   26796             :   0, /*sq_repeat*/
   26797             :   __pyx_sq_item_memoryview, /*sq_item*/
   26798             :   0, /*sq_slice*/
   26799             :   0, /*sq_ass_item*/
   26800             :   0, /*sq_ass_slice*/
   26801             :   0, /*sq_contains*/
   26802             :   0, /*sq_inplace_concat*/
   26803             :   0, /*sq_inplace_repeat*/
   26804             : };
   26805             : 
   26806             : static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
   26807             :   __pyx_memoryview___len__, /*mp_length*/
   26808             :   __pyx_memoryview___getitem__, /*mp_subscript*/
   26809             :   __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
   26810             : };
   26811             : 
   26812             : static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
   26813             :   #if PY_MAJOR_VERSION < 3
   26814             :   0, /*bf_getreadbuffer*/
   26815             :   #endif
   26816             :   #if PY_MAJOR_VERSION < 3
   26817             :   0, /*bf_getwritebuffer*/
   26818             :   #endif
   26819             :   #if PY_MAJOR_VERSION < 3
   26820             :   0, /*bf_getsegcount*/
   26821             :   #endif
   26822             :   #if PY_MAJOR_VERSION < 3
   26823             :   0, /*bf_getcharbuffer*/
   26824             :   #endif
   26825             :   __pyx_memoryview_getbuffer, /*bf_getbuffer*/
   26826             :   0, /*bf_releasebuffer*/
   26827             : };
   26828             : 
   26829             : static PyTypeObject __pyx_type___pyx_memoryview = {
   26830             :   PyVarObject_HEAD_INIT(0, 0)
   26831             :   "scipy.sparse.csgraph._matching.""memoryview", /*tp_name*/
   26832             :   sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
   26833             :   0, /*tp_itemsize*/
   26834             :   __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
   26835             :   #if PY_VERSION_HEX < 0x030800b4
   26836             :   0, /*tp_print*/
   26837             :   #endif
   26838             :   #if PY_VERSION_HEX >= 0x030800b4
   26839             :   0, /*tp_vectorcall_offset*/
   26840             :   #endif
   26841             :   0, /*tp_getattr*/
   26842             :   0, /*tp_setattr*/
   26843             :   #if PY_MAJOR_VERSION < 3
   26844             :   0, /*tp_compare*/
   26845             :   #endif
   26846             :   #if PY_MAJOR_VERSION >= 3
   26847             :   0, /*tp_as_async*/
   26848             :   #endif
   26849             :   __pyx_memoryview___repr__, /*tp_repr*/
   26850             :   0, /*tp_as_number*/
   26851             :   &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
   26852             :   &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
   26853             :   0, /*tp_hash*/
   26854             :   0, /*tp_call*/
   26855             :   __pyx_memoryview___str__, /*tp_str*/
   26856             :   0, /*tp_getattro*/
   26857             :   0, /*tp_setattro*/
   26858             :   &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
   26859             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
   26860             :   0, /*tp_doc*/
   26861             :   __pyx_tp_traverse_memoryview, /*tp_traverse*/
   26862             :   __pyx_tp_clear_memoryview, /*tp_clear*/
   26863             :   0, /*tp_richcompare*/
   26864             :   0, /*tp_weaklistoffset*/
   26865             :   0, /*tp_iter*/
   26866             :   0, /*tp_iternext*/
   26867             :   __pyx_methods_memoryview, /*tp_methods*/
   26868             :   0, /*tp_members*/
   26869             :   __pyx_getsets_memoryview, /*tp_getset*/
   26870             :   0, /*tp_base*/
   26871             :   0, /*tp_dict*/
   26872             :   0, /*tp_descr_get*/
   26873             :   0, /*tp_descr_set*/
   26874             :   #if !CYTHON_USE_TYPE_SPECS
   26875             :   0, /*tp_dictoffset*/
   26876             :   #endif
   26877             :   0, /*tp_init*/
   26878             :   0, /*tp_alloc*/
   26879             :   __pyx_tp_new_memoryview, /*tp_new*/
   26880             :   0, /*tp_free*/
   26881             :   0, /*tp_is_gc*/
   26882             :   0, /*tp_bases*/
   26883             :   0, /*tp_mro*/
   26884             :   0, /*tp_cache*/
   26885             :   0, /*tp_subclasses*/
   26886             :   0, /*tp_weaklist*/
   26887             :   0, /*tp_del*/
   26888             :   0, /*tp_version_tag*/
   26889             :   #if PY_VERSION_HEX >= 0x030400a1
   26890             :   #if CYTHON_USE_TP_FINALIZE
   26891             :   0, /*tp_finalize*/
   26892             :   #else
   26893             :   NULL, /*tp_finalize*/
   26894             :   #endif
   26895             :   #endif
   26896             :   #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   26897             :   0, /*tp_vectorcall*/
   26898             :   #endif
   26899             :   #if __PYX_NEED_TP_PRINT_SLOT == 1
   26900             :   0, /*tp_print*/
   26901             :   #endif
   26902             :   #if PY_VERSION_HEX >= 0x030C0000
   26903             :   0, /*tp_watched*/
   26904             :   #endif
   26905             :   #if PY_VERSION_HEX >= 0x030d00A4
   26906             :   0, /*tp_versions_used*/
   26907             :   #endif
   26908             :   #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   26909             :   0, /*tp_pypy_flags*/
   26910             :   #endif
   26911             : };
   26912             : #endif
   26913             : static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
   26914             : 
   26915         338 : static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
   26916         338 :   struct __pyx_memoryviewslice_obj *p;
   26917         338 :   PyObject *o = __pyx_tp_new_memoryview(t, a, k);
   26918         338 :   if (unlikely(!o)) return 0;
   26919         338 :   p = ((struct __pyx_memoryviewslice_obj *)o);
   26920         338 :   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
   26921         338 :   p->from_object = Py_None; Py_INCREF(Py_None);
   26922         338 :   p->from_slice.memview = NULL;
   26923         338 :   return o;
   26924             : }
   26925             : 
   26926         338 : static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
   26927         338 :   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
   26928             :   #if CYTHON_USE_TP_FINALIZE
   26929         338 :   if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
   26930           0 :     if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc__memoryviewslice) {
   26931           0 :       if (PyObject_CallFinalizerFromDealloc(o)) return;
   26932             :     }
   26933             :   }
   26934             :   #endif
   26935         338 :   PyObject_GC_UnTrack(o);
   26936             :   {
   26937         338 :     PyObject *etype, *eval, *etb;
   26938         338 :     PyErr_Fetch(&etype, &eval, &etb);
   26939         338 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
   26940         338 :     __pyx_memoryviewslice___dealloc__(o);
   26941         338 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
   26942         338 :     PyErr_Restore(etype, eval, etb);
   26943             :   }
   26944         338 :   Py_CLEAR(p->from_object);
   26945         338 :   PyObject_GC_Track(o);
   26946         338 :   __pyx_tp_dealloc_memoryview(o);
   26947             : }
   26948             : 
   26949           0 : static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
   26950           0 :   int e;
   26951           0 :   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
   26952           0 :   e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
   26953           0 :   if (p->from_object) {
   26954           0 :     e = (*v)(p->from_object, a); if (e) return e;
   26955             :   }
   26956             :   return 0;
   26957             : }
   26958             : 
   26959           0 : static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
   26960           0 :   PyObject* tmp;
   26961           0 :   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
   26962           0 :   __pyx_tp_clear_memoryview(o);
   26963           0 :   tmp = ((PyObject*)p->from_object);
   26964           0 :   p->from_object = Py_None; Py_INCREF(Py_None);
   26965           0 :   Py_XDECREF(tmp);
   26966           0 :   __PYX_XCLEAR_MEMVIEW(&p->from_slice, 1);
   26967           0 :   return 0;
   26968             : }
   26969             : 
   26970             : static PyMethodDef __pyx_methods__memoryviewslice[] = {
   26971             :   {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   26972             :   {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   26973             :   {0, 0, 0, 0}
   26974             : };
   26975             : #if CYTHON_USE_TYPE_SPECS
   26976             : static PyType_Slot __pyx_type___pyx_memoryviewslice_slots[] = {
   26977             :   {Py_tp_dealloc, (void *)__pyx_tp_dealloc__memoryviewslice},
   26978             :   {Py_tp_doc, (void *)PyDoc_STR("Internal class for passing memoryview slices to Python")},
   26979             :   {Py_tp_traverse, (void *)__pyx_tp_traverse__memoryviewslice},
   26980             :   {Py_tp_clear, (void *)__pyx_tp_clear__memoryviewslice},
   26981             :   {Py_tp_methods, (void *)__pyx_methods__memoryviewslice},
   26982             :   {Py_tp_new, (void *)__pyx_tp_new__memoryviewslice},
   26983             :   {0, 0},
   26984             : };
   26985             : static PyType_Spec __pyx_type___pyx_memoryviewslice_spec = {
   26986             :   "scipy.sparse.csgraph._matching._memoryviewslice",
   26987             :   sizeof(struct __pyx_memoryviewslice_obj),
   26988             :   0,
   26989             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE,
   26990             :   __pyx_type___pyx_memoryviewslice_slots,
   26991             : };
   26992             : #else
   26993             : 
   26994             : static PyTypeObject __pyx_type___pyx_memoryviewslice = {
   26995             :   PyVarObject_HEAD_INIT(0, 0)
   26996             :   "scipy.sparse.csgraph._matching.""_memoryviewslice", /*tp_name*/
   26997             :   sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
   26998             :   0, /*tp_itemsize*/
   26999             :   __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
   27000             :   #if PY_VERSION_HEX < 0x030800b4
   27001             :   0, /*tp_print*/
   27002             :   #endif
   27003             :   #if PY_VERSION_HEX >= 0x030800b4
   27004             :   0, /*tp_vectorcall_offset*/
   27005             :   #endif
   27006             :   0, /*tp_getattr*/
   27007             :   0, /*tp_setattr*/
   27008             :   #if PY_MAJOR_VERSION < 3
   27009             :   0, /*tp_compare*/
   27010             :   #endif
   27011             :   #if PY_MAJOR_VERSION >= 3
   27012             :   0, /*tp_as_async*/
   27013             :   #endif
   27014             :   #if CYTHON_COMPILING_IN_PYPY || 0
   27015             :   __pyx_memoryview___repr__, /*tp_repr*/
   27016             :   #else
   27017             :   0, /*tp_repr*/
   27018             :   #endif
   27019             :   0, /*tp_as_number*/
   27020             :   0, /*tp_as_sequence*/
   27021             :   0, /*tp_as_mapping*/
   27022             :   0, /*tp_hash*/
   27023             :   0, /*tp_call*/
   27024             :   #if CYTHON_COMPILING_IN_PYPY || 0
   27025             :   __pyx_memoryview___str__, /*tp_str*/
   27026             :   #else
   27027             :   0, /*tp_str*/
   27028             :   #endif
   27029             :   0, /*tp_getattro*/
   27030             :   0, /*tp_setattro*/
   27031             :   0, /*tp_as_buffer*/
   27032             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE, /*tp_flags*/
   27033             :   PyDoc_STR("Internal class for passing memoryview slices to Python"), /*tp_doc*/
   27034             :   __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
   27035             :   __pyx_tp_clear__memoryviewslice, /*tp_clear*/
   27036             :   0, /*tp_richcompare*/
   27037             :   0, /*tp_weaklistoffset*/
   27038             :   0, /*tp_iter*/
   27039             :   0, /*tp_iternext*/
   27040             :   __pyx_methods__memoryviewslice, /*tp_methods*/
   27041             :   0, /*tp_members*/
   27042             :   0, /*tp_getset*/
   27043             :   0, /*tp_base*/
   27044             :   0, /*tp_dict*/
   27045             :   0, /*tp_descr_get*/
   27046             :   0, /*tp_descr_set*/
   27047             :   #if !CYTHON_USE_TYPE_SPECS
   27048             :   0, /*tp_dictoffset*/
   27049             :   #endif
   27050             :   0, /*tp_init*/
   27051             :   0, /*tp_alloc*/
   27052             :   __pyx_tp_new__memoryviewslice, /*tp_new*/
   27053             :   0, /*tp_free*/
   27054             :   0, /*tp_is_gc*/
   27055             :   0, /*tp_bases*/
   27056             :   0, /*tp_mro*/
   27057             :   0, /*tp_cache*/
   27058             :   0, /*tp_subclasses*/
   27059             :   0, /*tp_weaklist*/
   27060             :   0, /*tp_del*/
   27061             :   0, /*tp_version_tag*/
   27062             :   #if PY_VERSION_HEX >= 0x030400a1
   27063             :   #if CYTHON_USE_TP_FINALIZE
   27064             :   0, /*tp_finalize*/
   27065             :   #else
   27066             :   NULL, /*tp_finalize*/
   27067             :   #endif
   27068             :   #endif
   27069             :   #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   27070             :   0, /*tp_vectorcall*/
   27071             :   #endif
   27072             :   #if __PYX_NEED_TP_PRINT_SLOT == 1
   27073             :   0, /*tp_print*/
   27074             :   #endif
   27075             :   #if PY_VERSION_HEX >= 0x030C0000
   27076             :   0, /*tp_watched*/
   27077             :   #endif
   27078             :   #if PY_VERSION_HEX >= 0x030d00A4
   27079             :   0, /*tp_versions_used*/
   27080             :   #endif
   27081             :   #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   27082             :   0, /*tp_pypy_flags*/
   27083             :   #endif
   27084             : };
   27085             : #endif
   27086             : 
   27087             : static PyMethodDef __pyx_methods[] = {
   27088             :   {0, 0, 0, 0}
   27089             : };
   27090             : #ifndef CYTHON_SMALL_CODE
   27091             : #if defined(__clang__)
   27092             :     #define CYTHON_SMALL_CODE
   27093             : #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
   27094             :     #define CYTHON_SMALL_CODE __attribute__((cold))
   27095             : #else
   27096             :     #define CYTHON_SMALL_CODE
   27097             : #endif
   27098             : #endif
   27099             : /* #### Code section: pystring_table ### */
   27100             : 
   27101           3 : static int __Pyx_CreateStringTabAndInitStrings(void) {
   27102           3 :   __Pyx_StringTabEntry __pyx_string_tab[] = {
   27103           3 :     {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
   27104           3 :     {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},
   27105           3 :     {&__pyx_kp_s_All_dimensions_preceding_dimensi, __pyx_k_All_dimensions_preceding_dimensi, sizeof(__pyx_k_All_dimensions_preceding_dimensi), 0, 0, 1, 0},
   27106           3 :     {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1},
   27107           3 :     {&__pyx_n_s_BTYPE, __pyx_k_BTYPE, sizeof(__pyx_k_BTYPE), 0, 0, 1, 1},
   27108           3 :     {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0},
   27109           3 :     {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0},
   27110           3 :     {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0},
   27111           3 :     {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0},
   27112           3 :     {&__pyx_kp_u_Cannot_index_with_type, __pyx_k_Cannot_index_with_type, sizeof(__pyx_k_Cannot_index_with_type), 0, 1, 0, 0},
   27113           3 :     {&__pyx_kp_s_Cannot_transpose_memoryview_with, __pyx_k_Cannot_transpose_memoryview_with, sizeof(__pyx_k_Cannot_transpose_memoryview_with), 0, 0, 1, 0},
   27114           3 :     {&__pyx_n_s_DTYPE, __pyx_k_DTYPE, sizeof(__pyx_k_DTYPE), 0, 0, 1, 1},
   27115           3 :     {&__pyx_kp_s_Dimension_d_is_not_direct, __pyx_k_Dimension_d_is_not_direct, sizeof(__pyx_k_Dimension_d_is_not_direct), 0, 0, 1, 0},
   27116           3 :     {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
   27117           3 :     {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0},
   27118           3 :     {&__pyx_n_s_ITYPE, __pyx_k_ITYPE, sizeof(__pyx_k_ITYPE), 0, 0, 1, 1},
   27119           3 :     {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
   27120           3 :     {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
   27121           3 :     {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
   27122           3 :     {&__pyx_kp_s_Index_out_of_bounds_axis_d, __pyx_k_Index_out_of_bounds_axis_d, sizeof(__pyx_k_Index_out_of_bounds_axis_d), 0, 0, 1, 0},
   27123           3 :     {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},
   27124           3 :     {&__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 1, 0, 0},
   27125           3 :     {&__pyx_kp_u_Invalid_shape_in_axis, __pyx_k_Invalid_shape_in_axis, sizeof(__pyx_k_Invalid_shape_in_axis), 0, 1, 0, 0},
   27126           3 :     {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
   27127           3 :     {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0},
   27128           3 :     {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0},
   27129           3 :     {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},
   27130           3 :     {&__pyx_kp_u_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 1, 0, 0},
   27131           3 :     {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
   27132           3 :     {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
   27133           3 :     {&__pyx_kp_s_Step_may_not_be_zero_axis_d, __pyx_k_Step_may_not_be_zero_axis_d, sizeof(__pyx_k_Step_may_not_be_zero_axis_d), 0, 0, 1, 0},
   27134           3 :     {&__pyx_n_s_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 1, 1},
   27135           3 :     {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
   27136           3 :     {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0},
   27137           3 :     {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
   27138           3 :     {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},
   27139           3 :     {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0},
   27140           3 :     {&__pyx_n_s__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 0, 1, 1},
   27141           3 :     {&__pyx_n_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 1},
   27142           3 :     {&__pyx_n_s__32, __pyx_k__32, sizeof(__pyx_k__32), 0, 0, 1, 1},
   27143           3 :     {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0},
   27144           3 :     {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0},
   27145           3 :     {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
   27146           3 :     {&__pyx_n_s_abc, __pyx_k_abc, sizeof(__pyx_k_abc), 0, 0, 1, 1},
   27147           3 :     {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
   27148           3 :     {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},
   27149           3 :     {&__pyx_kp_u_and, __pyx_k_and, sizeof(__pyx_k_and), 0, 1, 0, 0},
   27150           3 :     {&__pyx_n_s_arange, __pyx_k_arange, sizeof(__pyx_k_arange), 0, 0, 1, 1},
   27151           3 :     {&__pyx_n_s_argsort, __pyx_k_argsort, sizeof(__pyx_k_argsort), 0, 0, 1, 1},
   27152           3 :     {&__pyx_n_s_asarray, __pyx_k_asarray, sizeof(__pyx_k_asarray), 0, 0, 1, 1},
   27153           3 :     {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1},
   27154           3 :     {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
   27155           3 :     {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
   27156           3 :     {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
   27157           3 :     {&__pyx_n_s_biadj_indices, __pyx_k_biadj_indices, sizeof(__pyx_k_biadj_indices), 0, 0, 1, 1},
   27158           3 :     {&__pyx_n_s_biadj_indptr, __pyx_k_biadj_indptr, sizeof(__pyx_k_biadj_indptr), 0, 0, 1, 1},
   27159           3 :     {&__pyx_n_s_biadjacency, __pyx_k_biadjacency, sizeof(__pyx_k_biadjacency), 0, 0, 1, 1},
   27160           3 :     {&__pyx_n_s_biadjacency_t, __pyx_k_biadjacency_t, sizeof(__pyx_k_biadjacency_t), 0, 0, 1, 1},
   27161           3 :     {&__pyx_n_s_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 0, 1, 1},
   27162           3 :     {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
   27163           3 :     {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},
   27164           3 :     {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
   27165           3 :     {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1},
   27166           3 :     {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
   27167           3 :     {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
   27168           3 :     {&__pyx_kp_s_collections_abc, __pyx_k_collections_abc, sizeof(__pyx_k_collections_abc), 0, 0, 1, 0},
   27169           3 :     {&__pyx_n_u_column, __pyx_k_column, sizeof(__pyx_k_column), 0, 1, 0, 1},
   27170           3 :     {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},
   27171           3 :     {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},
   27172           3 :     {&__pyx_n_s_convert_pydata_sparse_to_scipy, __pyx_k_convert_pydata_sparse_to_scipy, sizeof(__pyx_k_convert_pydata_sparse_to_scipy), 0, 0, 1, 1},
   27173           3 :     {&__pyx_n_u_coo, __pyx_k_coo, sizeof(__pyx_k_coo), 0, 1, 0, 1},
   27174           3 :     {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1},
   27175           3 :     {&__pyx_n_u_csc, __pyx_k_csc, sizeof(__pyx_k_csc), 0, 1, 0, 1},
   27176           3 :     {&__pyx_n_u_csr, __pyx_k_csr, sizeof(__pyx_k_csr), 0, 1, 0, 1},
   27177           3 :     {&__pyx_n_s_csr_array, __pyx_k_csr_array, sizeof(__pyx_k_csr_array), 0, 0, 1, 1},
   27178           3 :     {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
   27179           3 :     {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
   27180           3 :     {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
   27181           3 :     {&__pyx_n_s_double, __pyx_k_double, sizeof(__pyx_k_double), 0, 0, 1, 1},
   27182           3 :     {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
   27183           3 :     {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1},
   27184           3 :     {&__pyx_n_s_eliminate_zeros, __pyx_k_eliminate_zeros, sizeof(__pyx_k_eliminate_zeros), 0, 0, 1, 1},
   27185           3 :     {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
   27186           3 :     {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
   27187           3 :     {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
   27188           3 :     {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
   27189           3 :     {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
   27190           3 :     {&__pyx_kp_u_expected_a_matrix_containing_num, __pyx_k_expected_a_matrix_containing_num, sizeof(__pyx_k_expected_a_matrix_containing_num), 0, 1, 0, 0},
   27191           3 :     {&__pyx_kp_u_explicit_zero_weights_are_remove, __pyx_k_explicit_zero_weights_are_remove, sizeof(__pyx_k_explicit_zero_weights_are_remove), 0, 1, 0, 0},
   27192           3 :     {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
   27193           3 :     {&__pyx_n_s_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 1, 1},
   27194           3 :     {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
   27195           3 :     {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1},
   27196           3 :     {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},
   27197           3 :     {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
   27198           3 :     {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
   27199           3 :     {&__pyx_kp_u_got, __pyx_k_got, sizeof(__pyx_k_got), 0, 1, 0, 0},
   27200           3 :     {&__pyx_kp_u_got_2, __pyx_k_got_2, sizeof(__pyx_k_got_2), 0, 1, 0, 0},
   27201           3 :     {&__pyx_kp_u_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 1, 0, 0},
   27202           3 :     {&__pyx_n_s_graph, __pyx_k_graph, sizeof(__pyx_k_graph), 0, 0, 1, 1},
   27203           3 :     {&__pyx_kp_u_graph_must_be_in_CSC_CSR_or_COO, __pyx_k_graph_must_be_in_CSC_CSR_or_COO, sizeof(__pyx_k_graph_must_be_in_CSC_CSR_or_COO), 0, 1, 0, 0},
   27204           3 :     {&__pyx_kp_u_graph_must_be_sparse, __pyx_k_graph_must_be_sparse, sizeof(__pyx_k_graph_must_be_sparse), 0, 1, 0, 0},
   27205           3 :     {&__pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_k_home_czgdp18079_Quansight_scipy, sizeof(__pyx_k_home_czgdp18079_Quansight_scipy), 0, 0, 1, 0},
   27206           3 :     {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
   27207           3 :     {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
   27208           3 :     {&__pyx_n_s_iinfo, __pyx_k_iinfo, sizeof(__pyx_k_iinfo), 0, 0, 1, 1},
   27209           3 :     {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
   27210           3 :     {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
   27211           3 :     {&__pyx_n_s_indices, __pyx_k_indices, sizeof(__pyx_k_indices), 0, 0, 1, 1},
   27212           3 :     {&__pyx_n_s_indptr, __pyx_k_indptr, sizeof(__pyx_k_indptr), 0, 0, 1, 1},
   27213           3 :     {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
   27214           3 :     {&__pyx_n_s_int32, __pyx_k_int32, sizeof(__pyx_k_int32), 0, 0, 1, 1},
   27215           3 :     {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
   27216           3 :     {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
   27217           3 :     {&__pyx_n_s_isposinf, __pyx_k_isposinf, sizeof(__pyx_k_isposinf), 0, 0, 1, 1},
   27218           3 :     {&__pyx_n_s_issparse, __pyx_k_issparse, sizeof(__pyx_k_issparse), 0, 0, 1, 1},
   27219           3 :     {&__pyx_n_s_issubdtype, __pyx_k_issubdtype, sizeof(__pyx_k_issubdtype), 0, 0, 1, 1},
   27220           3 :     {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
   27221           3 :     {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0},
   27222           3 :     {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1},
   27223           3 :     {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
   27224           3 :     {&__pyx_n_s_matching, __pyx_k_matching, sizeof(__pyx_k_matching), 0, 0, 1, 1},
   27225           3 :     {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
   27226           3 :     {&__pyx_n_s_maximize, __pyx_k_maximize, sizeof(__pyx_k_maximize), 0, 0, 1, 1},
   27227           3 :     {&__pyx_n_s_maximum_bipartite_matching, __pyx_k_maximum_bipartite_matching, sizeof(__pyx_k_maximum_bipartite_matching), 0, 0, 1, 1},
   27228           3 :     {&__pyx_kp_u_maximum_bipartite_matching_grap, __pyx_k_maximum_bipartite_matching_grap, sizeof(__pyx_k_maximum_bipartite_matching_grap), 0, 1, 0, 0},
   27229           3 :     {&__pyx_kp_u_maximum_bipartite_matching_line, __pyx_k_maximum_bipartite_matching_line, sizeof(__pyx_k_maximum_bipartite_matching_line), 0, 1, 0, 0},
   27230           3 :     {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},
   27231           3 :     {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
   27232           3 :     {&__pyx_kp_u_min_weight_full_bipartite_match, __pyx_k_min_weight_full_bipartite_match, sizeof(__pyx_k_min_weight_full_bipartite_match), 0, 1, 0, 0},
   27233           3 :     {&__pyx_n_s_min_weight_full_bipartite_matchi, __pyx_k_min_weight_full_bipartite_matchi, sizeof(__pyx_k_min_weight_full_bipartite_matchi), 0, 0, 1, 1},
   27234           3 :     {&__pyx_kp_u_min_weight_full_bipartite_matchi_2, __pyx_k_min_weight_full_bipartite_matchi_2, sizeof(__pyx_k_min_weight_full_bipartite_matchi_2), 0, 1, 0, 0},
   27235           3 :     {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
   27236           3 :     {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
   27237           3 :     {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
   27238           3 :     {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
   27239           3 :     {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
   27240           3 :     {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
   27241           3 :     {&__pyx_kp_u_no_full_matching_exists, __pyx_k_no_full_matching_exists, sizeof(__pyx_k_no_full_matching_exists), 0, 1, 0, 0},
   27242           3 :     {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
   27243           3 :     {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
   27244           3 :     {&__pyx_kp_u_numpy__core_multiarray_failed_to, __pyx_k_numpy__core_multiarray_failed_to, sizeof(__pyx_k_numpy__core_multiarray_failed_to), 0, 1, 0, 0},
   27245           3 :     {&__pyx_kp_u_numpy__core_umath_failed_to_impo, __pyx_k_numpy__core_umath_failed_to_impo, sizeof(__pyx_k_numpy__core_umath_failed_to_impo), 0, 1, 0, 0},
   27246           3 :     {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
   27247           3 :     {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
   27248           3 :     {&__pyx_n_s_perm_type, __pyx_k_perm_type, sizeof(__pyx_k_perm_type), 0, 0, 1, 1},
   27249           3 :     {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
   27250           3 :     {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
   27251           3 :     {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
   27252           3 :     {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
   27253           3 :     {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
   27254           3 :     {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
   27255           3 :     {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1},
   27256           3 :     {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
   27257           3 :     {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
   27258           3 :     {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
   27259           3 :     {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
   27260           3 :     {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
   27261           3 :     {&__pyx_n_s_register, __pyx_k_register, sizeof(__pyx_k_register), 0, 0, 1, 1},
   27262           3 :     {&__pyx_n_u_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 1, 0, 1},
   27263           3 :     {&__pyx_n_s_safe_downcast_indices, __pyx_k_safe_downcast_indices, sizeof(__pyx_k_safe_downcast_indices), 0, 0, 1, 1},
   27264           3 :     {&__pyx_n_s_scipy_sparse, __pyx_k_scipy_sparse, sizeof(__pyx_k_scipy_sparse), 0, 0, 1, 1},
   27265           3 :     {&__pyx_n_s_scipy_sparse__sputils, __pyx_k_scipy_sparse__sputils, sizeof(__pyx_k_scipy_sparse__sputils), 0, 0, 1, 1},
   27266           3 :     {&__pyx_n_s_scipy_sparse_csgraph__matching, __pyx_k_scipy_sparse_csgraph__matching, sizeof(__pyx_k_scipy_sparse_csgraph__matching), 0, 0, 1, 1},
   27267           3 :     {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
   27268           3 :     {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
   27269           3 :     {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
   27270           3 :     {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
   27271           3 :     {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
   27272           3 :     {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
   27273           3 :     {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
   27274           3 :     {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
   27275           3 :     {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},
   27276           3 :     {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0},
   27277           3 :     {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},
   27278           3 :     {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
   27279           3 :     {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
   27280           3 :     {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1},
   27281           3 :     {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
   27282           3 :     {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
   27283           3 :     {&__pyx_n_s_tocsr, __pyx_k_tocsr, sizeof(__pyx_k_tocsr), 0, 0, 1, 1},
   27284           3 :     {&__pyx_n_s_tools, __pyx_k_tools, sizeof(__pyx_k_tools), 0, 0, 1, 1},
   27285           3 :     {&__pyx_n_s_uint8, __pyx_k_uint8, sizeof(__pyx_k_uint8), 0, 0, 1, 1},
   27286           3 :     {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0},
   27287           3 :     {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0},
   27288           3 :     {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
   27289           3 :     {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
   27290           3 :     {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
   27291           3 :     {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
   27292           3 :     {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
   27293           3 :     {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
   27294           3 :     {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},
   27295           3 :     {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
   27296             :     {0, 0, 0, 0, 0, 0, 0}
   27297             :   };
   27298           3 :   return __Pyx_InitStrings(__pyx_string_tab);
   27299             : }
   27300             : /* #### Code section: cached_builtins ### */
   27301           3 : static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
   27302           3 :   __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 140, __pyx_L1_error)
   27303           3 :   __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 174, __pyx_L1_error)
   27304           3 :   __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 465, __pyx_L1_error)
   27305           3 :   __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_n_s_import); if (!__pyx_builtin___import__) __PYX_ERR(1, 100, __pyx_L1_error)
   27306           3 :   __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 156, __pyx_L1_error)
   27307           3 :   __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 159, __pyx_L1_error)
   27308           3 :   __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(1, 373, __pyx_L1_error)
   27309           3 :   __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 408, __pyx_L1_error)
   27310           3 :   __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 618, __pyx_L1_error)
   27311           3 :   __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 914, __pyx_L1_error)
   27312           3 :   __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1025, __pyx_L1_error)
   27313             :   return 0;
   27314             :   __pyx_L1_error:;
   27315             :   return -1;
   27316             : }
   27317             : /* #### Code section: cached_constants ### */
   27318             : 
   27319           3 : static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
   27320             :   __Pyx_RefNannyDeclarations
   27321           3 :   __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
   27322             : 
   27323             :   /* "View.MemoryView":582
   27324             :  *     def suboffsets(self):
   27325             :  *         if self.view.suboffsets == NULL:
   27326             :  *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
   27327             :  * 
   27328             :  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
   27329             :  */
   27330           3 :   __pyx_tuple__4 = PyTuple_New(1); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 582, __pyx_L1_error)
   27331           3 :   __Pyx_GOTREF(__pyx_tuple__4);
   27332           3 :   __Pyx_INCREF(__pyx_int_neg_1);
   27333           3 :   __Pyx_GIVEREF(__pyx_int_neg_1);
   27334           3 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_tuple__4, 0, __pyx_int_neg_1)) __PYX_ERR(1, 582, __pyx_L1_error);
   27335           3 :   __Pyx_GIVEREF(__pyx_tuple__4);
   27336             : 
   27337             :   /* "View.MemoryView":679
   27338             :  *     tup = <tuple>index if isinstance(index, tuple) else (index,)
   27339             :  * 
   27340             :  *     result = [slice(None)] * ndim             # <<<<<<<<<<<<<<
   27341             :  *     have_slices = False
   27342             :  *     seen_ellipsis = False
   27343             :  */
   27344           3 :   __pyx_slice__5 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__5)) __PYX_ERR(1, 679, __pyx_L1_error)
   27345           3 :   __Pyx_GOTREF(__pyx_slice__5);
   27346           3 :   __Pyx_GIVEREF(__pyx_slice__5);
   27347             : 
   27348             :   /* "(tree fragment)":4
   27349             :  *     cdef object __pyx_PickleError
   27350             :  *     cdef object __pyx_result
   27351             :  *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):             # <<<<<<<<<<<<<<
   27352             :  *         from pickle import PickleError as __pyx_PickleError
   27353             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   27354             :  */
   27355           3 :   __pyx_tuple__8 = PyTuple_Pack(3, __pyx_int_136983863, __pyx_int_112105877, __pyx_int_184977713); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 4, __pyx_L1_error)
   27356           3 :   __Pyx_GOTREF(__pyx_tuple__8);
   27357           3 :   __Pyx_GIVEREF(__pyx_tuple__8);
   27358             : 
   27359             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025
   27360             :  *         __pyx_import_array()
   27361             :  *     except Exception:
   27362             :  *         raise ImportError("numpy._core.multiarray failed to import")             # <<<<<<<<<<<<<<
   27363             :  * 
   27364             :  * cdef inline int import_umath() except -1:
   27365             :  */
   27366           3 :   __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_numpy__core_multiarray_failed_to); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1025, __pyx_L1_error)
   27367           3 :   __Pyx_GOTREF(__pyx_tuple__9);
   27368           3 :   __Pyx_GIVEREF(__pyx_tuple__9);
   27369             : 
   27370             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031
   27371             :  *         _import_umath()
   27372             :  *     except Exception:
   27373             :  *         raise ImportError("numpy._core.umath failed to import")             # <<<<<<<<<<<<<<
   27374             :  * 
   27375             :  * cdef inline int import_ufunc() except -1:
   27376             :  */
   27377           3 :   __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_numpy__core_umath_failed_to_impo); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 1031, __pyx_L1_error)
   27378           3 :   __Pyx_GOTREF(__pyx_tuple__10);
   27379           3 :   __Pyx_GIVEREF(__pyx_tuple__10);
   27380             : 
   27381             :   /* "scipy/sparse/csgraph/_matching.pyx":140
   27382             :  *     graph = convert_pydata_sparse_to_scipy(graph)
   27383             :  *     if not issparse(graph):
   27384             :  *         raise TypeError("graph must be sparse")             # <<<<<<<<<<<<<<
   27385             :  *     if graph.format not in ("csr", "csc", "coo"):
   27386             :  *         raise TypeError("graph must be in CSC, CSR, or COO format.")
   27387             :  */
   27388           3 :   __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_graph_must_be_sparse); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 140, __pyx_L1_error)
   27389           3 :   __Pyx_GOTREF(__pyx_tuple__11);
   27390           3 :   __Pyx_GIVEREF(__pyx_tuple__11);
   27391             : 
   27392             :   /* "scipy/sparse/csgraph/_matching.pyx":142
   27393             :  *         raise TypeError("graph must be sparse")
   27394             :  *     if graph.format not in ("csr", "csc", "coo"):
   27395             :  *         raise TypeError("graph must be in CSC, CSR, or COO format.")             # <<<<<<<<<<<<<<
   27396             :  *     graph = graph.tocsr()
   27397             :  *     i, j = graph.shape
   27398             :  */
   27399           3 :   __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_u_graph_must_be_in_CSC_CSR_or_COO); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 142, __pyx_L1_error)
   27400           3 :   __Pyx_GOTREF(__pyx_tuple__12);
   27401           3 :   __Pyx_GIVEREF(__pyx_tuple__12);
   27402             : 
   27403             :   /* "scipy/sparse/csgraph/_matching.pyx":506
   27404             :  *         matching = np.asarray(matching)
   27405             :  *         if np.sum(matching != -1) != min(i, j):
   27406             :  *             raise ValueError('no full matching exists')             # <<<<<<<<<<<<<<
   27407             :  *         b = np.asarray(_lapjvsp(biadjacency_t.indptr,
   27408             :  *                                 biadjacency_t.indices,
   27409             :  */
   27410           3 :   __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_u_no_full_matching_exists); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 506, __pyx_L1_error)
   27411           3 :   __Pyx_GOTREF(__pyx_tuple__13);
   27412           3 :   __Pyx_GIVEREF(__pyx_tuple__13);
   27413             : 
   27414             :   /* "View.MemoryView":100
   27415             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   27416             :  * try:
   27417             :  *     if __import__("sys").version_info >= (3, 3):             # <<<<<<<<<<<<<<
   27418             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   27419             :  *     else:
   27420             :  */
   27421           3 :   __pyx_tuple__14 = PyTuple_Pack(1, __pyx_n_s_sys); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(1, 100, __pyx_L1_error)
   27422           3 :   __Pyx_GOTREF(__pyx_tuple__14);
   27423           3 :   __Pyx_GIVEREF(__pyx_tuple__14);
   27424           3 :   __pyx_tuple__15 = PyTuple_Pack(2, __pyx_int_3, __pyx_int_3); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 100, __pyx_L1_error)
   27425           3 :   __Pyx_GOTREF(__pyx_tuple__15);
   27426           3 :   __Pyx_GIVEREF(__pyx_tuple__15);
   27427             : 
   27428             :   /* "View.MemoryView":101
   27429             :  * try:
   27430             :  *     if __import__("sys").version_info >= (3, 3):
   27431             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence             # <<<<<<<<<<<<<<
   27432             :  *     else:
   27433             :  *         __pyx_collections_abc_Sequence = __import__("collections").Sequence
   27434             :  */
   27435           3 :   __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_collections_abc); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(1, 101, __pyx_L1_error)
   27436           3 :   __Pyx_GOTREF(__pyx_tuple__16);
   27437           3 :   __Pyx_GIVEREF(__pyx_tuple__16);
   27438             : 
   27439             :   /* "View.MemoryView":103
   27440             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   27441             :  *     else:
   27442             :  *         __pyx_collections_abc_Sequence = __import__("collections").Sequence             # <<<<<<<<<<<<<<
   27443             :  * except:
   27444             :  * 
   27445             :  */
   27446           3 :   __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_s_collections); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 103, __pyx_L1_error)
   27447           3 :   __Pyx_GOTREF(__pyx_tuple__17);
   27448           3 :   __Pyx_GIVEREF(__pyx_tuple__17);
   27449             : 
   27450             :   /* "View.MemoryView":309
   27451             :  *         return self.name
   27452             :  * 
   27453             :  * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
   27454             :  * cdef strided = Enum("<strided and direct>") # default
   27455             :  * cdef indirect = Enum("<strided and indirect>")
   27456             :  */
   27457           3 :   __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 309, __pyx_L1_error)
   27458           3 :   __Pyx_GOTREF(__pyx_tuple__18);
   27459           3 :   __Pyx_GIVEREF(__pyx_tuple__18);
   27460             : 
   27461             :   /* "View.MemoryView":310
   27462             :  * 
   27463             :  * cdef generic = Enum("<strided and direct or indirect>")
   27464             :  * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
   27465             :  * cdef indirect = Enum("<strided and indirect>")
   27466             :  * 
   27467             :  */
   27468           3 :   __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 310, __pyx_L1_error)
   27469           3 :   __Pyx_GOTREF(__pyx_tuple__19);
   27470           3 :   __Pyx_GIVEREF(__pyx_tuple__19);
   27471             : 
   27472             :   /* "View.MemoryView":311
   27473             :  * cdef generic = Enum("<strided and direct or indirect>")
   27474             :  * cdef strided = Enum("<strided and direct>") # default
   27475             :  * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
   27476             :  * 
   27477             :  * 
   27478             :  */
   27479           3 :   __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 311, __pyx_L1_error)
   27480           3 :   __Pyx_GOTREF(__pyx_tuple__20);
   27481           3 :   __Pyx_GIVEREF(__pyx_tuple__20);
   27482             : 
   27483             :   /* "View.MemoryView":314
   27484             :  * 
   27485             :  * 
   27486             :  * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
   27487             :  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
   27488             :  * 
   27489             :  */
   27490           3 :   __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 314, __pyx_L1_error)
   27491           3 :   __Pyx_GOTREF(__pyx_tuple__21);
   27492           3 :   __Pyx_GIVEREF(__pyx_tuple__21);
   27493             : 
   27494             :   /* "View.MemoryView":315
   27495             :  * 
   27496             :  * cdef contiguous = Enum("<contiguous and direct>")
   27497             :  * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
   27498             :  * 
   27499             :  * 
   27500             :  */
   27501           3 :   __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 315, __pyx_L1_error)
   27502           3 :   __Pyx_GOTREF(__pyx_tuple__22);
   27503           3 :   __Pyx_GIVEREF(__pyx_tuple__22);
   27504             : 
   27505             :   /* "(tree fragment)":1
   27506             :  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
   27507             :  *     cdef object __pyx_PickleError
   27508             :  *     cdef object __pyx_result
   27509             :  */
   27510           3 :   __pyx_tuple__23 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(1, 1, __pyx_L1_error)
   27511           3 :   __Pyx_GOTREF(__pyx_tuple__23);
   27512           3 :   __Pyx_GIVEREF(__pyx_tuple__23);
   27513           3 :   __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(1, 1, __pyx_L1_error)
   27514             : 
   27515             :   /* "scipy/sparse/csgraph/_matching.pyx":18
   27516             :  * 
   27517             :  * 
   27518             :  * def maximum_bipartite_matching(graph, perm_type='row'):             # <<<<<<<<<<<<<<
   27519             :  *     r"""
   27520             :  *     maximum_bipartite_matching(graph, perm_type='row')
   27521             :  */
   27522           3 :   __pyx_tuple__25 = PyTuple_Pack(8, __pyx_n_s_graph, __pyx_n_s_perm_type, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_indices, __pyx_n_s_indptr, __pyx_n_s_x, __pyx_n_s_y); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 18, __pyx_L1_error)
   27523           3 :   __Pyx_GOTREF(__pyx_tuple__25);
   27524           3 :   __Pyx_GIVEREF(__pyx_tuple__25);
   27525           3 :   __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_maximum_bipartite_matching, 18, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 18, __pyx_L1_error)
   27526           3 :   __pyx_tuple__27 = PyTuple_Pack(1, ((PyObject*)__pyx_n_u_row)); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 18, __pyx_L1_error)
   27527           3 :   __Pyx_GOTREF(__pyx_tuple__27);
   27528           3 :   __Pyx_GIVEREF(__pyx_tuple__27);
   27529             : 
   27530             :   /* "scipy/sparse/csgraph/_matching.pyx":290
   27531             :  * 
   27532             :  * 
   27533             :  * def min_weight_full_bipartite_matching(biadjacency, maximize=False):             # <<<<<<<<<<<<<<
   27534             :  *     r"""
   27535             :  *     min_weight_full_bipartite_matching(biadjacency, maximize=False)
   27536             :  */
   27537           3 :   __pyx_tuple__29 = PyTuple_Pack(12, __pyx_n_s_biadjacency, __pyx_n_s_maximize, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_a, __pyx_n_s_biadj_indices, __pyx_n_s_biadj_indptr, __pyx_n_s_biadjacency_t, __pyx_n_s_matching, __pyx_n_s__28, __pyx_n_s_b, __pyx_n_s_indices); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 290, __pyx_L1_error)
   27538           3 :   __Pyx_GOTREF(__pyx_tuple__29);
   27539           3 :   __Pyx_GIVEREF(__pyx_tuple__29);
   27540           3 :   __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_min_weight_full_bipartite_matchi, 290, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 290, __pyx_L1_error)
   27541           3 :   __pyx_tuple__31 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 290, __pyx_L1_error)
   27542             :   __Pyx_GOTREF(__pyx_tuple__31);
   27543             :   __Pyx_GIVEREF(__pyx_tuple__31);
   27544             :   __Pyx_RefNannyFinishContext();
   27545             :   return 0;
   27546             :   __pyx_L1_error:;
   27547             :   __Pyx_RefNannyFinishContext();
   27548             :   return -1;
   27549             : }
   27550             : /* #### Code section: init_constants ### */
   27551             : 
   27552           3 : static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) {
   27553           3 :   if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error);
   27554           3 :   __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
   27555           3 :   __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
   27556           3 :   __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
   27557           3 :   __pyx_int_112105877 = PyInt_FromLong(112105877L); if (unlikely(!__pyx_int_112105877)) __PYX_ERR(0, 1, __pyx_L1_error)
   27558           3 :   __pyx_int_136983863 = PyInt_FromLong(136983863L); if (unlikely(!__pyx_int_136983863)) __PYX_ERR(0, 1, __pyx_L1_error)
   27559           3 :   __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(0, 1, __pyx_L1_error)
   27560           3 :   __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
   27561             :   return 0;
   27562             :   __pyx_L1_error:;
   27563             :   return -1;
   27564             : }
   27565             : /* #### Code section: init_globals ### */
   27566             : 
   27567           3 : static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
   27568             :   /* AssertionsEnabled.init */
   27569           3 :   if (likely(__Pyx_init_assertions_enabled() == 0)); else
   27570             : 
   27571           0 : if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
   27572             : 
   27573             :   return 0;
   27574           0 :   __pyx_L1_error:;
   27575           0 :   return -1;
   27576             : }
   27577             : /* #### Code section: init_module ### */
   27578             : 
   27579             : static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
   27580             : static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
   27581             : static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
   27582             : static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
   27583             : static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
   27584             : static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
   27585             : static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
   27586             : 
   27587           3 : static int __Pyx_modinit_global_init_code(void) {
   27588             :   __Pyx_RefNannyDeclarations
   27589           3 :   __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
   27590             :   /*--- Global init code ---*/
   27591           3 :   __pyx_collections_abc_Sequence = Py_None; Py_INCREF(Py_None);
   27592           3 :   generic = Py_None; Py_INCREF(Py_None);
   27593           3 :   strided = Py_None; Py_INCREF(Py_None);
   27594           3 :   indirect = Py_None; Py_INCREF(Py_None);
   27595           3 :   contiguous = Py_None; Py_INCREF(Py_None);
   27596           3 :   indirect_contiguous = Py_None; Py_INCREF(Py_None);
   27597           3 :   __Pyx_RefNannyFinishContext();
   27598           3 :   return 0;
   27599             : }
   27600             : 
   27601             : static int __Pyx_modinit_variable_export_code(void) {
   27602             :   __Pyx_RefNannyDeclarations
   27603             :   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
   27604             :   /*--- Variable export code ---*/
   27605             :   __Pyx_RefNannyFinishContext();
   27606             :   return 0;
   27607             : }
   27608             : 
   27609             : static int __Pyx_modinit_function_export_code(void) {
   27610             :   __Pyx_RefNannyDeclarations
   27611             :   __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
   27612             :   /*--- Function export code ---*/
   27613             :   __Pyx_RefNannyFinishContext();
   27614             :   return 0;
   27615             : }
   27616             : 
   27617           3 : static int __Pyx_modinit_type_init_code(void) {
   27618             :   __Pyx_RefNannyDeclarations
   27619           3 :   PyObject *__pyx_t_1 = NULL;
   27620           3 :   int __pyx_lineno = 0;
   27621           3 :   const char *__pyx_filename = NULL;
   27622           3 :   int __pyx_clineno = 0;
   27623           3 :   __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
   27624             :   /*--- Type init code ---*/
   27625           3 :   __pyx_vtabptr_array = &__pyx_vtable_array;
   27626           3 :   __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
   27627             :   #if CYTHON_USE_TYPE_SPECS
   27628             :   __pyx_array_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_array_spec, NULL); if (unlikely(!__pyx_array_type)) __PYX_ERR(1, 114, __pyx_L1_error)
   27629             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   27630             :   __pyx_array_type->tp_as_buffer = &__pyx_tp_as_buffer_array;
   27631             :   if (!__pyx_array_type->tp_as_buffer->bf_releasebuffer && __pyx_array_type->tp_base->tp_as_buffer && __pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer) {
   27632             :     __pyx_array_type->tp_as_buffer->bf_releasebuffer = __pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer;
   27633             :   }
   27634             :   #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
   27635             :   /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
   27636             :   #elif defined(_MSC_VER)
   27637             :   #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
   27638             :   #else
   27639             :   #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
   27640             :   #endif
   27641             :   if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_array_spec, __pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
   27642             :   #else
   27643           3 :   __pyx_array_type = &__pyx_type___pyx_array;
   27644             :   #endif
   27645             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   27646             :   #endif
   27647             :   #if !CYTHON_USE_TYPE_SPECS
   27648           3 :   if (__Pyx_PyType_Ready(__pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
   27649             :   #endif
   27650             :   #if PY_MAJOR_VERSION < 3
   27651             :   __pyx_array_type->tp_print = 0;
   27652             :   #endif
   27653           3 :   if (__Pyx_SetVtable(__pyx_array_type, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
   27654             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   27655           3 :   if (__Pyx_MergeVtables(__pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
   27656             :   #endif
   27657             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   27658           3 :   if (__Pyx_setup_reduce((PyObject *) __pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
   27659             :   #endif
   27660             :   #if CYTHON_USE_TYPE_SPECS
   27661             :   __pyx_MemviewEnum_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_MemviewEnum_spec, NULL); if (unlikely(!__pyx_MemviewEnum_type)) __PYX_ERR(1, 302, __pyx_L1_error)
   27662             :   if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_MemviewEnum_spec, __pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error)
   27663             :   #else
   27664           3 :   __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
   27665             :   #endif
   27666             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   27667             :   #endif
   27668             :   #if !CYTHON_USE_TYPE_SPECS
   27669           3 :   if (__Pyx_PyType_Ready(__pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error)
   27670             :   #endif
   27671             :   #if PY_MAJOR_VERSION < 3
   27672             :   __pyx_MemviewEnum_type->tp_print = 0;
   27673             :   #endif
   27674             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   27675           3 :   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_MemviewEnum_type->tp_dictoffset && __pyx_MemviewEnum_type->tp_getattro == PyObject_GenericGetAttr)) {
   27676           3 :     __pyx_MemviewEnum_type->tp_getattro = __Pyx_PyObject_GenericGetAttr;
   27677             :   }
   27678             :   #endif
   27679             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   27680           3 :   if (__Pyx_setup_reduce((PyObject *) __pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error)
   27681             :   #endif
   27682           3 :   __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
   27683           3 :   __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
   27684           3 :   __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
   27685           3 :   __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
   27686           3 :   __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
   27687           3 :   __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
   27688           3 :   __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
   27689           3 :   __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
   27690           3 :   __pyx_vtable_memoryview._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryview__get_base;
   27691             :   #if CYTHON_USE_TYPE_SPECS
   27692             :   __pyx_memoryview_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryview_spec, NULL); if (unlikely(!__pyx_memoryview_type)) __PYX_ERR(1, 337, __pyx_L1_error)
   27693             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   27694             :   __pyx_memoryview_type->tp_as_buffer = &__pyx_tp_as_buffer_memoryview;
   27695             :   if (!__pyx_memoryview_type->tp_as_buffer->bf_releasebuffer && __pyx_memoryview_type->tp_base->tp_as_buffer && __pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer) {
   27696             :     __pyx_memoryview_type->tp_as_buffer->bf_releasebuffer = __pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer;
   27697             :   }
   27698             :   #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
   27699             :   /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
   27700             :   #elif defined(_MSC_VER)
   27701             :   #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
   27702             :   #else
   27703             :   #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
   27704             :   #endif
   27705             :   if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryview_spec, __pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
   27706             :   #else
   27707           3 :   __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
   27708             :   #endif
   27709             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   27710             :   #endif
   27711             :   #if !CYTHON_USE_TYPE_SPECS
   27712           3 :   if (__Pyx_PyType_Ready(__pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
   27713             :   #endif
   27714             :   #if PY_MAJOR_VERSION < 3
   27715             :   __pyx_memoryview_type->tp_print = 0;
   27716             :   #endif
   27717             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   27718           3 :   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_memoryview_type->tp_dictoffset && __pyx_memoryview_type->tp_getattro == PyObject_GenericGetAttr)) {
   27719           3 :     __pyx_memoryview_type->tp_getattro = __Pyx_PyObject_GenericGetAttr;
   27720             :   }
   27721             :   #endif
   27722           3 :   if (__Pyx_SetVtable(__pyx_memoryview_type, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
   27723             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   27724           3 :   if (__Pyx_MergeVtables(__pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
   27725             :   #endif
   27726             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   27727           3 :   if (__Pyx_setup_reduce((PyObject *) __pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
   27728             :   #endif
   27729           3 :   __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
   27730           3 :   __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
   27731           3 :   __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
   27732           3 :   __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
   27733           3 :   __pyx_vtable__memoryviewslice.__pyx_base._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryviewslice__get_base;
   27734             :   #if CYTHON_USE_TYPE_SPECS
   27735             :   __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_memoryview_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 952, __pyx_L1_error)
   27736             :   __Pyx_GOTREF(__pyx_t_1);
   27737             :   __pyx_memoryviewslice_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryviewslice_spec, __pyx_t_1);
   27738             :   __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   27739             :   if (unlikely(!__pyx_memoryviewslice_type)) __PYX_ERR(1, 952, __pyx_L1_error)
   27740             :   if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryviewslice_spec, __pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
   27741             :   #else
   27742           3 :   __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
   27743             :   #endif
   27744             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   27745           3 :   __pyx_memoryviewslice_type->tp_base = __pyx_memoryview_type;
   27746             :   #endif
   27747             :   #if !CYTHON_USE_TYPE_SPECS
   27748           3 :   if (__Pyx_PyType_Ready(__pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
   27749             :   #endif
   27750             :   #if PY_MAJOR_VERSION < 3
   27751             :   __pyx_memoryviewslice_type->tp_print = 0;
   27752             :   #endif
   27753             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   27754           3 :   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_memoryviewslice_type->tp_dictoffset && __pyx_memoryviewslice_type->tp_getattro == PyObject_GenericGetAttr)) {
   27755           3 :     __pyx_memoryviewslice_type->tp_getattro = __Pyx_PyObject_GenericGetAttr;
   27756             :   }
   27757             :   #endif
   27758           3 :   if (__Pyx_SetVtable(__pyx_memoryviewslice_type, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
   27759             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   27760           3 :   if (__Pyx_MergeVtables(__pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
   27761             :   #endif
   27762             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   27763           3 :   if (__Pyx_setup_reduce((PyObject *) __pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
   27764             :   #endif
   27765             :   __Pyx_RefNannyFinishContext();
   27766             :   return 0;
   27767           0 :   __pyx_L1_error:;
   27768           0 :   __Pyx_XDECREF(__pyx_t_1);
   27769           0 :   __Pyx_RefNannyFinishContext();
   27770           0 :   return -1;
   27771             : }
   27772             : 
   27773           3 : static int __Pyx_modinit_type_import_code(void) {
   27774             :   __Pyx_RefNannyDeclarations
   27775           3 :   PyObject *__pyx_t_1 = NULL;
   27776           3 :   int __pyx_lineno = 0;
   27777           3 :   const char *__pyx_filename = NULL;
   27778           3 :   int __pyx_clineno = 0;
   27779           3 :   __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
   27780             :   /*--- Type import code ---*/
   27781           3 :   __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error)
   27782           3 :   __Pyx_GOTREF(__pyx_t_1);
   27783           3 :   __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
   27784             :   #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
   27785             :   sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject),
   27786             :   #elif CYTHON_COMPILING_IN_LIMITED_API
   27787             :   sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject),
   27788             :   #else
   27789             :   sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyHeapTypeObject),
   27790             :   #endif
   27791           3 :   __Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error)
   27792           3 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   27793           3 :   __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 271, __pyx_L1_error)
   27794           3 :   __Pyx_GOTREF(__pyx_t_1);
   27795           3 :   __pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyArray_Descr),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 271, __pyx_L1_error)
   27796           3 :   __pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyArrayIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 316, __pyx_L1_error)
   27797           3 :   __pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyArrayMultiIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 320, __pyx_L1_error)
   27798           3 :   __pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyArrayObject),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 359, __pyx_L1_error)
   27799           3 :   __pyx_ptype_5numpy_generic = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 847, __pyx_L1_error)
   27800           3 :   __pyx_ptype_5numpy_number = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "number", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 849, __pyx_L1_error)
   27801           3 :   __pyx_ptype_5numpy_integer = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 851, __pyx_L1_error)
   27802           3 :   __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 853, __pyx_L1_error)
   27803           3 :   __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 855, __pyx_L1_error)
   27804           3 :   __pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 857, __pyx_L1_error)
   27805           3 :   __pyx_ptype_5numpy_floating = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 859, __pyx_L1_error)
   27806           3 :   __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 861, __pyx_L1_error)
   27807           3 :   __pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 863, __pyx_L1_error)
   27808           3 :   __pyx_ptype_5numpy_character = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "character", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 865, __pyx_L1_error)
   27809           3 :   __pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyUFuncObject),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 929, __pyx_L1_error)
   27810           3 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   27811             :   __Pyx_RefNannyFinishContext();
   27812             :   return 0;
   27813           0 :   __pyx_L1_error:;
   27814           0 :   __Pyx_XDECREF(__pyx_t_1);
   27815           0 :   __Pyx_RefNannyFinishContext();
   27816           0 :   return -1;
   27817             : }
   27818             : 
   27819             : static int __Pyx_modinit_variable_import_code(void) {
   27820             :   __Pyx_RefNannyDeclarations
   27821             :   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
   27822             :   /*--- Variable import code ---*/
   27823             :   __Pyx_RefNannyFinishContext();
   27824             :   return 0;
   27825             : }
   27826             : 
   27827             : static int __Pyx_modinit_function_import_code(void) {
   27828             :   __Pyx_RefNannyDeclarations
   27829             :   __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
   27830             :   /*--- Function import code ---*/
   27831             :   __Pyx_RefNannyFinishContext();
   27832             :   return 0;
   27833             : }
   27834             : 
   27835             : 
   27836             : #if PY_MAJOR_VERSION >= 3
   27837             : #if CYTHON_PEP489_MULTI_PHASE_INIT
   27838             : static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
   27839             : static int __pyx_pymod_exec__matching(PyObject* module); /*proto*/
   27840             : static PyModuleDef_Slot __pyx_moduledef_slots[] = {
   27841             :   {Py_mod_create, (void*)__pyx_pymod_create},
   27842             :   {Py_mod_exec, (void*)__pyx_pymod_exec__matching},
   27843             :   {0, NULL}
   27844             : };
   27845             : #endif
   27846             : 
   27847             : #ifdef __cplusplus
   27848             : namespace {
   27849             :   struct PyModuleDef __pyx_moduledef =
   27850             :   #else
   27851             :   static struct PyModuleDef __pyx_moduledef =
   27852             :   #endif
   27853             :   {
   27854             :       PyModuleDef_HEAD_INIT,
   27855             :       "_matching",
   27856             :       0, /* m_doc */
   27857             :     #if CYTHON_PEP489_MULTI_PHASE_INIT
   27858             :       0, /* m_size */
   27859             :     #elif CYTHON_USE_MODULE_STATE
   27860             :       sizeof(__pyx_mstate), /* m_size */
   27861             :     #else
   27862             :       -1, /* m_size */
   27863             :     #endif
   27864             :       __pyx_methods /* m_methods */,
   27865             :     #if CYTHON_PEP489_MULTI_PHASE_INIT
   27866             :       __pyx_moduledef_slots, /* m_slots */
   27867             :     #else
   27868             :       NULL, /* m_reload */
   27869             :     #endif
   27870             :     #if CYTHON_USE_MODULE_STATE
   27871             :       __pyx_m_traverse, /* m_traverse */
   27872             :       __pyx_m_clear, /* m_clear */
   27873             :       NULL /* m_free */
   27874             :     #else
   27875             :       NULL, /* m_traverse */
   27876             :       NULL, /* m_clear */
   27877             :       NULL /* m_free */
   27878             :     #endif
   27879             :   };
   27880             :   #ifdef __cplusplus
   27881             : } /* anonymous namespace */
   27882             : #endif
   27883             : #endif
   27884             : 
   27885             : #ifndef CYTHON_NO_PYINIT_EXPORT
   27886             : #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
   27887             : #elif PY_MAJOR_VERSION < 3
   27888             : #ifdef __cplusplus
   27889             : #define __Pyx_PyMODINIT_FUNC extern "C" void
   27890             : #else
   27891             : #define __Pyx_PyMODINIT_FUNC void
   27892             : #endif
   27893             : #else
   27894             : #ifdef __cplusplus
   27895             : #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
   27896             : #else
   27897             : #define __Pyx_PyMODINIT_FUNC PyObject *
   27898             : #endif
   27899             : #endif
   27900             : 
   27901             : 
   27902             : #if PY_MAJOR_VERSION < 3
   27903             : __Pyx_PyMODINIT_FUNC init_matching(void) CYTHON_SMALL_CODE; /*proto*/
   27904             : __Pyx_PyMODINIT_FUNC init_matching(void)
   27905             : #else
   27906             : __Pyx_PyMODINIT_FUNC PyInit__matching(void) CYTHON_SMALL_CODE; /*proto*/
   27907           3 : __Pyx_PyMODINIT_FUNC PyInit__matching(void)
   27908             : #if CYTHON_PEP489_MULTI_PHASE_INIT
   27909             : {
   27910           3 :   return PyModuleDef_Init(&__pyx_moduledef);
   27911             : }
   27912           3 : static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
   27913             :     #if PY_VERSION_HEX >= 0x030700A1
   27914           3 :     static PY_INT64_T main_interpreter_id = -1;
   27915           3 :     PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
   27916           3 :     if (main_interpreter_id == -1) {
   27917           3 :         main_interpreter_id = current_id;
   27918           6 :         return (unlikely(current_id == -1)) ? -1 : 0;
   27919           0 :     } else if (unlikely(main_interpreter_id != current_id))
   27920             :     #else
   27921             :     static PyInterpreterState *main_interpreter = NULL;
   27922             :     PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
   27923             :     if (!main_interpreter) {
   27924             :         main_interpreter = current_interpreter;
   27925             :     } else if (unlikely(main_interpreter != current_interpreter))
   27926             :     #endif
   27927             :     {
   27928           0 :         PyErr_SetString(
   27929             :             PyExc_ImportError,
   27930             :             "Interpreter change detected - this module can only be loaded into one interpreter per process.");
   27931           0 :         return -1;
   27932             :     }
   27933             :     return 0;
   27934             : }
   27935             : #if CYTHON_COMPILING_IN_LIMITED_API
   27936             : static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none)
   27937             : #else
   27938          12 : static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
   27939             : #endif
   27940             : {
   27941          12 :     PyObject *value = PyObject_GetAttrString(spec, from_name);
   27942          12 :     int result = 0;
   27943          12 :     if (likely(value)) {
   27944          12 :         if (allow_none || value != Py_None) {
   27945             : #if CYTHON_COMPILING_IN_LIMITED_API
   27946             :             result = PyModule_AddObject(module, to_name, value);
   27947             : #else
   27948           9 :             result = PyDict_SetItemString(moddict, to_name, value);
   27949             : #endif
   27950             :         }
   27951          12 :         Py_DECREF(value);
   27952           0 :     } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
   27953           0 :         PyErr_Clear();
   27954             :     } else {
   27955             :         result = -1;
   27956             :     }
   27957          12 :     return result;
   27958             : }
   27959           3 : static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
   27960           3 :     PyObject *module = NULL, *moddict, *modname;
   27961           3 :     CYTHON_UNUSED_VAR(def);
   27962           3 :     if (__Pyx_check_single_interpreter())
   27963             :         return NULL;
   27964           3 :     if (__pyx_m)
   27965           0 :         return __Pyx_NewRef(__pyx_m);
   27966           3 :     modname = PyObject_GetAttrString(spec, "name");
   27967           3 :     if (unlikely(!modname)) goto bad;
   27968           3 :     module = PyModule_NewObject(modname);
   27969           3 :     Py_DECREF(modname);
   27970           3 :     if (unlikely(!module)) goto bad;
   27971             : #if CYTHON_COMPILING_IN_LIMITED_API
   27972             :     moddict = module;
   27973             : #else
   27974           3 :     moddict = PyModule_GetDict(module);
   27975           3 :     if (unlikely(!moddict)) goto bad;
   27976             : #endif
   27977           3 :     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
   27978           3 :     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
   27979           3 :     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
   27980           3 :     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
   27981             :     return module;
   27982           0 : bad:
   27983           0 :     Py_XDECREF(module);
   27984           0 :     return NULL;
   27985             : }
   27986             : 
   27987             : 
   27988           3 : static CYTHON_SMALL_CODE int __pyx_pymod_exec__matching(PyObject *__pyx_pyinit_module)
   27989             : #endif
   27990             : #endif
   27991             : {
   27992           3 :   int stringtab_initialized = 0;
   27993             :   #if CYTHON_USE_MODULE_STATE
   27994             :   int pystate_addmodule_run = 0;
   27995             :   #endif
   27996           3 :   PyObject *__pyx_t_1 = NULL;
   27997           3 :   PyObject *__pyx_t_2 = NULL;
   27998           3 :   PyObject *__pyx_t_3 = NULL;
   27999           3 :   PyObject *__pyx_t_4 = NULL;
   28000           3 :   PyObject *__pyx_t_5 = NULL;
   28001           3 :   int __pyx_t_6;
   28002           3 :   PyObject *__pyx_t_7 = NULL;
   28003           3 :   static PyThread_type_lock __pyx_t_8[8];
   28004           3 :   int __pyx_t_9;
   28005           3 :   int __pyx_lineno = 0;
   28006           3 :   const char *__pyx_filename = NULL;
   28007           3 :   int __pyx_clineno = 0;
   28008             :   __Pyx_RefNannyDeclarations
   28009             :   #if CYTHON_PEP489_MULTI_PHASE_INIT
   28010           3 :   if (__pyx_m) {
   28011           0 :     if (__pyx_m == __pyx_pyinit_module) return 0;
   28012           0 :     PyErr_SetString(PyExc_RuntimeError, "Module '_matching' has already been imported. Re-initialisation is not supported.");
   28013           0 :     return -1;
   28014             :   }
   28015             :   #elif PY_MAJOR_VERSION >= 3
   28016             :   if (__pyx_m) return __Pyx_NewRef(__pyx_m);
   28017             :   #endif
   28018             :   /*--- Module creation code ---*/
   28019             :   #if CYTHON_PEP489_MULTI_PHASE_INIT
   28020           3 :   __pyx_m = __pyx_pyinit_module;
   28021           3 :   Py_INCREF(__pyx_m);
   28022             :   #else
   28023             :   #if PY_MAJOR_VERSION < 3
   28024             :   __pyx_m = Py_InitModule4("_matching", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
   28025             :   if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
   28026             :   #elif CYTHON_USE_MODULE_STATE
   28027             :   __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
   28028             :   {
   28029             :     int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
   28030             :     __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "_matching" pseudovariable */
   28031             :     if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
   28032             :     pystate_addmodule_run = 1;
   28033             :   }
   28034             :   #else
   28035             :   __pyx_m = PyModule_Create(&__pyx_moduledef);
   28036             :   if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
   28037             :   #endif
   28038             :   #endif
   28039           3 :   CYTHON_UNUSED_VAR(__pyx_t_1);
   28040           3 :   __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
   28041           3 :   Py_INCREF(__pyx_d);
   28042           3 :   __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
   28043           3 :   __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
   28044           3 :   if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   28045             :   #if CYTHON_REFNANNY
   28046             : __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
   28047             : if (!__Pyx_RefNanny) {
   28048             :   PyErr_Clear();
   28049             :   __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
   28050             :   if (!__Pyx_RefNanny)
   28051             :       Py_FatalError("failed to import 'refnanny' module");
   28052             : }
   28053             : #endif
   28054           3 :   __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit__matching(void)", 0);
   28055           3 :   if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   28056             :   #ifdef __Pxy_PyFrame_Initialize_Offsets
   28057             :   __Pxy_PyFrame_Initialize_Offsets();
   28058             :   #endif
   28059           3 :   __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
   28060           3 :   __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
   28061           3 :   __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
   28062             :   #ifdef __Pyx_CyFunction_USED
   28063           3 :   if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   28064             :   #endif
   28065             :   #ifdef __Pyx_FusedFunction_USED
   28066             :   if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   28067             :   #endif
   28068             :   #ifdef __Pyx_Coroutine_USED
   28069             :   if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   28070             :   #endif
   28071             :   #ifdef __Pyx_Generator_USED
   28072             :   if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   28073             :   #endif
   28074             :   #ifdef __Pyx_AsyncGen_USED
   28075             :   if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   28076             :   #endif
   28077             :   #ifdef __Pyx_StopAsyncIteration_USED
   28078             :   if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   28079             :   #endif
   28080             :   /*--- Library function declarations ---*/
   28081             :   /*--- Threads initialization code ---*/
   28082             :   #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
   28083             :   PyEval_InitThreads();
   28084             :   #endif
   28085             :   /*--- Initialize various global constants etc. ---*/
   28086           3 :   if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   28087           3 :   stringtab_initialized = 1;
   28088           3 :   if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   28089             :   #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
   28090             :   if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   28091             :   #endif
   28092           3 :   if (__pyx_module_is_main_scipy__sparse__csgraph___matching) {
   28093           0 :     if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   28094             :   }
   28095             :   #if PY_MAJOR_VERSION >= 3
   28096             :   {
   28097           3 :     PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
   28098           3 :     if (!PyDict_GetItemString(modules, "scipy.sparse.csgraph._matching")) {
   28099           0 :       if (unlikely((PyDict_SetItemString(modules, "scipy.sparse.csgraph._matching", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
   28100             :     }
   28101             :   }
   28102             :   #endif
   28103             :   /*--- Builtin init code ---*/
   28104           3 :   if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   28105             :   /*--- Constants init code ---*/
   28106           3 :   if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   28107             :   /*--- Global type/function init code ---*/
   28108           3 :   (void)__Pyx_modinit_global_init_code();
   28109           3 :   (void)__Pyx_modinit_variable_export_code();
   28110           3 :   (void)__Pyx_modinit_function_export_code();
   28111           3 :   if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
   28112           3 :   if (unlikely((__Pyx_modinit_type_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
   28113           3 :   (void)__Pyx_modinit_variable_import_code();
   28114           3 :   (void)__Pyx_modinit_function_import_code();
   28115             :   /*--- Execution code ---*/
   28116             :   #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
   28117             :   if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   28118             :   #endif
   28119             : 
   28120             :   /* "View.MemoryView":99
   28121             :  * 
   28122             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   28123             :  * try:             # <<<<<<<<<<<<<<
   28124             :  *     if __import__("sys").version_info >= (3, 3):
   28125             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   28126             :  */
   28127             :   {
   28128           3 :     __Pyx_PyThreadState_declare
   28129           3 :     __Pyx_PyThreadState_assign
   28130           3 :     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
   28131           3 :     __Pyx_XGOTREF(__pyx_t_1);
   28132           3 :     __Pyx_XGOTREF(__pyx_t_2);
   28133           3 :     __Pyx_XGOTREF(__pyx_t_3);
   28134             :     /*try:*/ {
   28135             : 
   28136             :       /* "View.MemoryView":100
   28137             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   28138             :  * try:
   28139             :  *     if __import__("sys").version_info >= (3, 3):             # <<<<<<<<<<<<<<
   28140             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   28141             :  *     else:
   28142             :  */
   28143           3 :       __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 100, __pyx_L2_error)
   28144           3 :       __Pyx_GOTREF(__pyx_t_4);
   28145           3 :       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_version_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 100, __pyx_L2_error)
   28146           3 :       __Pyx_GOTREF(__pyx_t_5);
   28147           3 :       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   28148           3 :       __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_tuple__15, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 100, __pyx_L2_error)
   28149           3 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   28150           3 :       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 100, __pyx_L2_error)
   28151           3 :       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   28152           3 :       if (__pyx_t_6) {
   28153             : 
   28154             :         /* "View.MemoryView":101
   28155             :  * try:
   28156             :  *     if __import__("sys").version_info >= (3, 3):
   28157             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence             # <<<<<<<<<<<<<<
   28158             :  *     else:
   28159             :  *         __pyx_collections_abc_Sequence = __import__("collections").Sequence
   28160             :  */
   28161           3 :         __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L2_error)
   28162           3 :         __Pyx_GOTREF(__pyx_t_4);
   28163           3 :         __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_abc); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 101, __pyx_L2_error)
   28164           3 :         __Pyx_GOTREF(__pyx_t_5);
   28165           3 :         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   28166           3 :         __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L2_error)
   28167           3 :         __Pyx_GOTREF(__pyx_t_4);
   28168           3 :         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   28169           3 :         __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
   28170           3 :         __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_4);
   28171           3 :         __Pyx_GIVEREF(__pyx_t_4);
   28172           3 :         __pyx_t_4 = 0;
   28173             : 
   28174             :         /* "View.MemoryView":100
   28175             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   28176             :  * try:
   28177             :  *     if __import__("sys").version_info >= (3, 3):             # <<<<<<<<<<<<<<
   28178             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   28179             :  *     else:
   28180             :  */
   28181           3 :         goto __pyx_L8;
   28182             :       }
   28183             : 
   28184             :       /* "View.MemoryView":103
   28185             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   28186             :  *     else:
   28187             :  *         __pyx_collections_abc_Sequence = __import__("collections").Sequence             # <<<<<<<<<<<<<<
   28188             :  * except:
   28189             :  * 
   28190             :  */
   28191             :       /*else*/ {
   28192           0 :         __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 103, __pyx_L2_error)
   28193           0 :         __Pyx_GOTREF(__pyx_t_4);
   28194           0 :         __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 103, __pyx_L2_error)
   28195           0 :         __Pyx_GOTREF(__pyx_t_5);
   28196           0 :         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   28197           0 :         __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
   28198           0 :         __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_5);
   28199           0 :         __Pyx_GIVEREF(__pyx_t_5);
   28200           0 :         __pyx_t_5 = 0;
   28201             :       }
   28202           3 :       __pyx_L8:;
   28203             : 
   28204             :       /* "View.MemoryView":99
   28205             :  * 
   28206             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   28207             :  * try:             # <<<<<<<<<<<<<<
   28208             :  *     if __import__("sys").version_info >= (3, 3):
   28209             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   28210             :  */
   28211             :     }
   28212           3 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   28213           3 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   28214           3 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   28215           3 :     goto __pyx_L7_try_end;
   28216           0 :     __pyx_L2_error:;
   28217           0 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   28218           0 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   28219             : 
   28220             :     /* "View.MemoryView":104
   28221             :  *     else:
   28222             :  *         __pyx_collections_abc_Sequence = __import__("collections").Sequence
   28223             :  * except:             # <<<<<<<<<<<<<<
   28224             :  * 
   28225             :  *     __pyx_collections_abc_Sequence = None
   28226             :  */
   28227             :     /*except:*/ {
   28228           0 :       __Pyx_AddTraceback("View.MemoryView", __pyx_clineno, __pyx_lineno, __pyx_filename);
   28229           0 :       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(1, 104, __pyx_L4_except_error)
   28230           0 :       __Pyx_XGOTREF(__pyx_t_5);
   28231           0 :       __Pyx_XGOTREF(__pyx_t_4);
   28232           0 :       __Pyx_XGOTREF(__pyx_t_7);
   28233             : 
   28234             :       /* "View.MemoryView":106
   28235             :  * except:
   28236             :  * 
   28237             :  *     __pyx_collections_abc_Sequence = None             # <<<<<<<<<<<<<<
   28238             :  * 
   28239             :  * 
   28240             :  */
   28241           0 :       __Pyx_INCREF(Py_None);
   28242           0 :       __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
   28243           0 :       __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, Py_None);
   28244           0 :       __Pyx_GIVEREF(Py_None);
   28245           0 :       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   28246           0 :       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   28247           0 :       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   28248           0 :       goto __pyx_L3_exception_handled;
   28249             :     }
   28250             : 
   28251             :     /* "View.MemoryView":99
   28252             :  * 
   28253             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   28254             :  * try:             # <<<<<<<<<<<<<<
   28255             :  *     if __import__("sys").version_info >= (3, 3):
   28256             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   28257             :  */
   28258           0 :     __pyx_L4_except_error:;
   28259           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   28260           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   28261           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   28262           0 :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   28263           0 :     goto __pyx_L1_error;
   28264           0 :     __pyx_L3_exception_handled:;
   28265           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   28266           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   28267           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   28268           0 :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   28269           3 :     __pyx_L7_try_end:;
   28270             :   }
   28271             : 
   28272             :   /* "View.MemoryView":241
   28273             :  * 
   28274             :  * 
   28275             :  *     try:             # <<<<<<<<<<<<<<
   28276             :  *         count = __pyx_collections_abc_Sequence.count
   28277             :  *         index = __pyx_collections_abc_Sequence.index
   28278             :  */
   28279             :   {
   28280           3 :     __Pyx_PyThreadState_declare
   28281           3 :     __Pyx_PyThreadState_assign
   28282           3 :     __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
   28283           3 :     __Pyx_XGOTREF(__pyx_t_3);
   28284           3 :     __Pyx_XGOTREF(__pyx_t_2);
   28285           3 :     __Pyx_XGOTREF(__pyx_t_1);
   28286             :     /*try:*/ {
   28287             : 
   28288             :       /* "View.MemoryView":242
   28289             :  * 
   28290             :  *     try:
   28291             :  *         count = __pyx_collections_abc_Sequence.count             # <<<<<<<<<<<<<<
   28292             :  *         index = __pyx_collections_abc_Sequence.index
   28293             :  *     except:
   28294             :  */
   28295           3 :       __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 242, __pyx_L11_error)
   28296           3 :       __Pyx_GOTREF(__pyx_t_7);
   28297           3 :       if (__Pyx_SetItemOnTypeDict(__pyx_array_type, __pyx_n_s_count, __pyx_t_7) < 0) __PYX_ERR(1, 242, __pyx_L11_error)
   28298           3 :       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   28299           3 :       PyType_Modified(__pyx_array_type);
   28300             : 
   28301             :       /* "View.MemoryView":243
   28302             :  *     try:
   28303             :  *         count = __pyx_collections_abc_Sequence.count
   28304             :  *         index = __pyx_collections_abc_Sequence.index             # <<<<<<<<<<<<<<
   28305             :  *     except:
   28306             :  *         pass
   28307             :  */
   28308           3 :       __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 243, __pyx_L11_error)
   28309           3 :       __Pyx_GOTREF(__pyx_t_7);
   28310           3 :       if (__Pyx_SetItemOnTypeDict(__pyx_array_type, __pyx_n_s_index, __pyx_t_7) < 0) __PYX_ERR(1, 243, __pyx_L11_error)
   28311           3 :       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   28312           3 :       PyType_Modified(__pyx_array_type);
   28313             : 
   28314             :       /* "View.MemoryView":241
   28315             :  * 
   28316             :  * 
   28317             :  *     try:             # <<<<<<<<<<<<<<
   28318             :  *         count = __pyx_collections_abc_Sequence.count
   28319             :  *         index = __pyx_collections_abc_Sequence.index
   28320             :  */
   28321             :     }
   28322           3 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   28323           3 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   28324           3 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   28325           3 :     goto __pyx_L16_try_end;
   28326           0 :     __pyx_L11_error:;
   28327           0 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   28328           0 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   28329           0 :     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   28330             : 
   28331             :     /* "View.MemoryView":244
   28332             :  *         count = __pyx_collections_abc_Sequence.count
   28333             :  *         index = __pyx_collections_abc_Sequence.index
   28334             :  *     except:             # <<<<<<<<<<<<<<
   28335             :  *         pass
   28336             :  * 
   28337             :  */
   28338             :     /*except:*/ {
   28339           0 :       __Pyx_ErrRestore(0,0,0);
   28340           0 :       goto __pyx_L12_exception_handled;
   28341             :     }
   28342           0 :     __pyx_L12_exception_handled:;
   28343           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   28344           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   28345           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   28346           0 :     __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
   28347           3 :     __pyx_L16_try_end:;
   28348             :   }
   28349             : 
   28350             :   /* "View.MemoryView":309
   28351             :  *         return self.name
   28352             :  * 
   28353             :  * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
   28354             :  * cdef strided = Enum("<strided and direct>") # default
   28355             :  * cdef indirect = Enum("<strided and indirect>")
   28356             :  */
   28357           3 :   __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 309, __pyx_L1_error)
   28358           3 :   __Pyx_GOTREF(__pyx_t_7);
   28359           3 :   __Pyx_XGOTREF(generic);
   28360           3 :   __Pyx_DECREF_SET(generic, __pyx_t_7);
   28361           3 :   __Pyx_GIVEREF(__pyx_t_7);
   28362           3 :   __pyx_t_7 = 0;
   28363             : 
   28364             :   /* "View.MemoryView":310
   28365             :  * 
   28366             :  * cdef generic = Enum("<strided and direct or indirect>")
   28367             :  * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
   28368             :  * cdef indirect = Enum("<strided and indirect>")
   28369             :  * 
   28370             :  */
   28371           3 :   __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 310, __pyx_L1_error)
   28372           3 :   __Pyx_GOTREF(__pyx_t_7);
   28373           3 :   __Pyx_XGOTREF(strided);
   28374           3 :   __Pyx_DECREF_SET(strided, __pyx_t_7);
   28375           3 :   __Pyx_GIVEREF(__pyx_t_7);
   28376           3 :   __pyx_t_7 = 0;
   28377             : 
   28378             :   /* "View.MemoryView":311
   28379             :  * cdef generic = Enum("<strided and direct or indirect>")
   28380             :  * cdef strided = Enum("<strided and direct>") # default
   28381             :  * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
   28382             :  * 
   28383             :  * 
   28384             :  */
   28385           3 :   __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 311, __pyx_L1_error)
   28386           3 :   __Pyx_GOTREF(__pyx_t_7);
   28387           3 :   __Pyx_XGOTREF(indirect);
   28388           3 :   __Pyx_DECREF_SET(indirect, __pyx_t_7);
   28389           3 :   __Pyx_GIVEREF(__pyx_t_7);
   28390           3 :   __pyx_t_7 = 0;
   28391             : 
   28392             :   /* "View.MemoryView":314
   28393             :  * 
   28394             :  * 
   28395             :  * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
   28396             :  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
   28397             :  * 
   28398             :  */
   28399           3 :   __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 314, __pyx_L1_error)
   28400           3 :   __Pyx_GOTREF(__pyx_t_7);
   28401           3 :   __Pyx_XGOTREF(contiguous);
   28402           3 :   __Pyx_DECREF_SET(contiguous, __pyx_t_7);
   28403           3 :   __Pyx_GIVEREF(__pyx_t_7);
   28404           3 :   __pyx_t_7 = 0;
   28405             : 
   28406             :   /* "View.MemoryView":315
   28407             :  * 
   28408             :  * cdef contiguous = Enum("<contiguous and direct>")
   28409             :  * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
   28410             :  * 
   28411             :  * 
   28412             :  */
   28413           3 :   __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 315, __pyx_L1_error)
   28414           3 :   __Pyx_GOTREF(__pyx_t_7);
   28415           3 :   __Pyx_XGOTREF(indirect_contiguous);
   28416           3 :   __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_7);
   28417           3 :   __Pyx_GIVEREF(__pyx_t_7);
   28418           3 :   __pyx_t_7 = 0;
   28419             : 
   28420             :   /* "View.MemoryView":323
   28421             :  * 
   28422             :  * 
   28423             :  * cdef int __pyx_memoryview_thread_locks_used = 0             # <<<<<<<<<<<<<<
   28424             :  * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [
   28425             :  *     PyThread_allocate_lock(),
   28426             :  */
   28427           3 :   __pyx_memoryview_thread_locks_used = 0;
   28428             : 
   28429             :   /* "View.MemoryView":324
   28430             :  * 
   28431             :  * cdef int __pyx_memoryview_thread_locks_used = 0
   28432             :  * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [             # <<<<<<<<<<<<<<
   28433             :  *     PyThread_allocate_lock(),
   28434             :  *     PyThread_allocate_lock(),
   28435             :  */
   28436           3 :   __pyx_t_8[0] = PyThread_allocate_lock();
   28437           3 :   __pyx_t_8[1] = PyThread_allocate_lock();
   28438           3 :   __pyx_t_8[2] = PyThread_allocate_lock();
   28439           3 :   __pyx_t_8[3] = PyThread_allocate_lock();
   28440           3 :   __pyx_t_8[4] = PyThread_allocate_lock();
   28441           3 :   __pyx_t_8[5] = PyThread_allocate_lock();
   28442           3 :   __pyx_t_8[6] = PyThread_allocate_lock();
   28443           3 :   __pyx_t_8[7] = PyThread_allocate_lock();
   28444           3 :   memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_8, sizeof(__pyx_memoryview_thread_locks[0]) * (8));
   28445             : 
   28446             :   /* "View.MemoryView":982
   28447             :  * 
   28448             :  * 
   28449             :  *     try:             # <<<<<<<<<<<<<<
   28450             :  *         count = __pyx_collections_abc_Sequence.count
   28451             :  *         index = __pyx_collections_abc_Sequence.index
   28452             :  */
   28453             :   {
   28454           3 :     __Pyx_PyThreadState_declare
   28455           3 :     __Pyx_PyThreadState_assign
   28456           3 :     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
   28457           3 :     __Pyx_XGOTREF(__pyx_t_1);
   28458           3 :     __Pyx_XGOTREF(__pyx_t_2);
   28459           3 :     __Pyx_XGOTREF(__pyx_t_3);
   28460             :     /*try:*/ {
   28461             : 
   28462             :       /* "View.MemoryView":983
   28463             :  * 
   28464             :  *     try:
   28465             :  *         count = __pyx_collections_abc_Sequence.count             # <<<<<<<<<<<<<<
   28466             :  *         index = __pyx_collections_abc_Sequence.index
   28467             :  *     except:
   28468             :  */
   28469           3 :       __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 983, __pyx_L17_error)
   28470           3 :       __Pyx_GOTREF(__pyx_t_7);
   28471           3 :       if (__Pyx_SetItemOnTypeDict(__pyx_memoryviewslice_type, __pyx_n_s_count, __pyx_t_7) < 0) __PYX_ERR(1, 983, __pyx_L17_error)
   28472           3 :       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   28473           3 :       PyType_Modified(__pyx_memoryviewslice_type);
   28474             : 
   28475             :       /* "View.MemoryView":984
   28476             :  *     try:
   28477             :  *         count = __pyx_collections_abc_Sequence.count
   28478             :  *         index = __pyx_collections_abc_Sequence.index             # <<<<<<<<<<<<<<
   28479             :  *     except:
   28480             :  *         pass
   28481             :  */
   28482           3 :       __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 984, __pyx_L17_error)
   28483           3 :       __Pyx_GOTREF(__pyx_t_7);
   28484           3 :       if (__Pyx_SetItemOnTypeDict(__pyx_memoryviewslice_type, __pyx_n_s_index, __pyx_t_7) < 0) __PYX_ERR(1, 984, __pyx_L17_error)
   28485           3 :       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   28486           3 :       PyType_Modified(__pyx_memoryviewslice_type);
   28487             : 
   28488             :       /* "View.MemoryView":982
   28489             :  * 
   28490             :  * 
   28491             :  *     try:             # <<<<<<<<<<<<<<
   28492             :  *         count = __pyx_collections_abc_Sequence.count
   28493             :  *         index = __pyx_collections_abc_Sequence.index
   28494             :  */
   28495             :     }
   28496           3 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   28497           3 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   28498           3 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   28499           3 :     goto __pyx_L22_try_end;
   28500           0 :     __pyx_L17_error:;
   28501           0 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   28502           0 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   28503           0 :     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   28504             : 
   28505             :     /* "View.MemoryView":985
   28506             :  *         count = __pyx_collections_abc_Sequence.count
   28507             :  *         index = __pyx_collections_abc_Sequence.index
   28508             :  *     except:             # <<<<<<<<<<<<<<
   28509             :  *         pass
   28510             :  * 
   28511             :  */
   28512             :     /*except:*/ {
   28513           0 :       __Pyx_ErrRestore(0,0,0);
   28514           0 :       goto __pyx_L18_exception_handled;
   28515             :     }
   28516           0 :     __pyx_L18_exception_handled:;
   28517           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   28518           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   28519           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   28520           0 :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   28521           3 :     __pyx_L22_try_end:;
   28522             :   }
   28523             : 
   28524             :   /* "View.MemoryView":988
   28525             :  *         pass
   28526             :  * 
   28527             :  * try:             # <<<<<<<<<<<<<<
   28528             :  *     if __pyx_collections_abc_Sequence:
   28529             :  * 
   28530             :  */
   28531             :   {
   28532           3 :     __Pyx_PyThreadState_declare
   28533           3 :     __Pyx_PyThreadState_assign
   28534           3 :     __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
   28535           3 :     __Pyx_XGOTREF(__pyx_t_3);
   28536           3 :     __Pyx_XGOTREF(__pyx_t_2);
   28537           3 :     __Pyx_XGOTREF(__pyx_t_1);
   28538             :     /*try:*/ {
   28539             : 
   28540             :       /* "View.MemoryView":989
   28541             :  * 
   28542             :  * try:
   28543             :  *     if __pyx_collections_abc_Sequence:             # <<<<<<<<<<<<<<
   28544             :  * 
   28545             :  * 
   28546             :  */
   28547           3 :       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_collections_abc_Sequence); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 989, __pyx_L23_error)
   28548           3 :       if (__pyx_t_6) {
   28549             : 
   28550             :         /* "View.MemoryView":993
   28551             :  * 
   28552             :  * 
   28553             :  *         __pyx_collections_abc_Sequence.register(_memoryviewslice)             # <<<<<<<<<<<<<<
   28554             :  *         __pyx_collections_abc_Sequence.register(array)
   28555             :  * except:
   28556             :  */
   28557           3 :         __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_register); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 993, __pyx_L23_error)
   28558           3 :         __Pyx_GOTREF(__pyx_t_7);
   28559           3 :         __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_memoryviewslice_type)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 993, __pyx_L23_error)
   28560           3 :         __Pyx_GOTREF(__pyx_t_4);
   28561           3 :         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   28562           3 :         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   28563             : 
   28564             :         /* "View.MemoryView":994
   28565             :  * 
   28566             :  *         __pyx_collections_abc_Sequence.register(_memoryviewslice)
   28567             :  *         __pyx_collections_abc_Sequence.register(array)             # <<<<<<<<<<<<<<
   28568             :  * except:
   28569             :  *     pass  # ignore failure, it's a minor issue
   28570             :  */
   28571           3 :         __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_register); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 994, __pyx_L23_error)
   28572           3 :         __Pyx_GOTREF(__pyx_t_4);
   28573           3 :         __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_array_type)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 994, __pyx_L23_error)
   28574           3 :         __Pyx_GOTREF(__pyx_t_7);
   28575           3 :         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   28576           6 :         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   28577             : 
   28578             :         /* "View.MemoryView":989
   28579             :  * 
   28580             :  * try:
   28581             :  *     if __pyx_collections_abc_Sequence:             # <<<<<<<<<<<<<<
   28582             :  * 
   28583             :  * 
   28584             :  */
   28585             :       }
   28586             : 
   28587             :       /* "View.MemoryView":988
   28588             :  *         pass
   28589             :  * 
   28590             :  * try:             # <<<<<<<<<<<<<<
   28591             :  *     if __pyx_collections_abc_Sequence:
   28592             :  * 
   28593             :  */
   28594             :     }
   28595           3 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   28596           3 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   28597           3 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   28598           3 :     goto __pyx_L28_try_end;
   28599           0 :     __pyx_L23_error:;
   28600           0 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   28601           0 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   28602           0 :     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   28603             : 
   28604             :     /* "View.MemoryView":995
   28605             :  *         __pyx_collections_abc_Sequence.register(_memoryviewslice)
   28606             :  *         __pyx_collections_abc_Sequence.register(array)
   28607             :  * except:             # <<<<<<<<<<<<<<
   28608             :  *     pass  # ignore failure, it's a minor issue
   28609             :  * 
   28610             :  */
   28611             :     /*except:*/ {
   28612           0 :       __Pyx_ErrRestore(0,0,0);
   28613           0 :       goto __pyx_L24_exception_handled;
   28614             :     }
   28615           0 :     __pyx_L24_exception_handled:;
   28616           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   28617           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   28618           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   28619           0 :     __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
   28620           3 :     __pyx_L28_try_end:;
   28621             :   }
   28622             : 
   28623             :   /* "(tree fragment)":1
   28624             :  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
   28625             :  *     cdef object __pyx_PickleError
   28626             :  *     cdef object __pyx_result
   28627             :  */
   28628           3 :   __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
   28629           3 :   __Pyx_GOTREF(__pyx_t_7);
   28630           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
   28631           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   28632             : 
   28633             :   /* "scipy/sparse/csgraph/_matching.pyx":1
   28634             :  * import warnings             # <<<<<<<<<<<<<<
   28635             :  * 
   28636             :  * cimport cython
   28637             :  */
   28638           3 :   __pyx_t_7 = __Pyx_ImportDottedModule(__pyx_n_s_warnings, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1, __pyx_L1_error)
   28639           3 :   __Pyx_GOTREF(__pyx_t_7);
   28640           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_7) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   28641           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   28642             : 
   28643             :   /* "scipy/sparse/csgraph/_matching.pyx":4
   28644             :  * 
   28645             :  * cimport cython
   28646             :  * import numpy as np             # <<<<<<<<<<<<<<
   28647             :  * cimport numpy as np
   28648             :  * from libc.math cimport INFINITY
   28649             :  */
   28650           3 :   __pyx_t_7 = __Pyx_ImportDottedModule(__pyx_n_s_numpy, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4, __pyx_L1_error)
   28651           3 :   __Pyx_GOTREF(__pyx_t_7);
   28652           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_7) < 0) __PYX_ERR(0, 4, __pyx_L1_error)
   28653           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   28654             : 
   28655             :   /* "scipy/sparse/csgraph/_matching.pyx":9
   28656             :  * 
   28657             :  * 
   28658             :  * from scipy.sparse import issparse, csr_array             # <<<<<<<<<<<<<<
   28659             :  * from scipy.sparse._sputils import convert_pydata_sparse_to_scipy
   28660             :  * from ._tools import _safe_downcast_indices
   28661             :  */
   28662           3 :   __pyx_t_7 = PyList_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 9, __pyx_L1_error)
   28663           3 :   __Pyx_GOTREF(__pyx_t_7);
   28664           3 :   __Pyx_INCREF(__pyx_n_s_issparse);
   28665           3 :   __Pyx_GIVEREF(__pyx_n_s_issparse);
   28666           3 :   if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_issparse)) __PYX_ERR(0, 9, __pyx_L1_error);
   28667           3 :   __Pyx_INCREF(__pyx_n_s_csr_array);
   28668           3 :   __Pyx_GIVEREF(__pyx_n_s_csr_array);
   28669           3 :   if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_csr_array)) __PYX_ERR(0, 9, __pyx_L1_error);
   28670           3 :   __pyx_t_4 = __Pyx_Import(__pyx_n_s_scipy_sparse, __pyx_t_7, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9, __pyx_L1_error)
   28671           3 :   __Pyx_GOTREF(__pyx_t_4);
   28672           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   28673           3 :   __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_issparse); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 9, __pyx_L1_error)
   28674           3 :   __Pyx_GOTREF(__pyx_t_7);
   28675           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_issparse, __pyx_t_7) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
   28676           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   28677           3 :   __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_csr_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 9, __pyx_L1_error)
   28678           3 :   __Pyx_GOTREF(__pyx_t_7);
   28679           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_csr_array, __pyx_t_7) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
   28680           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   28681           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   28682             : 
   28683             :   /* "scipy/sparse/csgraph/_matching.pyx":10
   28684             :  * 
   28685             :  * from scipy.sparse import issparse, csr_array
   28686             :  * from scipy.sparse._sputils import convert_pydata_sparse_to_scipy             # <<<<<<<<<<<<<<
   28687             :  * from ._tools import _safe_downcast_indices
   28688             :  * 
   28689             :  */
   28690           3 :   __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10, __pyx_L1_error)
   28691           3 :   __Pyx_GOTREF(__pyx_t_4);
   28692           3 :   __Pyx_INCREF(__pyx_n_s_convert_pydata_sparse_to_scipy);
   28693           3 :   __Pyx_GIVEREF(__pyx_n_s_convert_pydata_sparse_to_scipy);
   28694           3 :   if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_convert_pydata_sparse_to_scipy)) __PYX_ERR(0, 10, __pyx_L1_error);
   28695           3 :   __pyx_t_7 = __Pyx_Import(__pyx_n_s_scipy_sparse__sputils, __pyx_t_4, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 10, __pyx_L1_error)
   28696           3 :   __Pyx_GOTREF(__pyx_t_7);
   28697           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   28698           3 :   __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_convert_pydata_sparse_to_scipy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10, __pyx_L1_error)
   28699           3 :   __Pyx_GOTREF(__pyx_t_4);
   28700           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_convert_pydata_sparse_to_scipy, __pyx_t_4) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
   28701           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   28702           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   28703             : 
   28704             :   /* "scipy/sparse/csgraph/_matching.pyx":11
   28705             :  * from scipy.sparse import issparse, csr_array
   28706             :  * from scipy.sparse._sputils import convert_pydata_sparse_to_scipy
   28707             :  * from ._tools import _safe_downcast_indices             # <<<<<<<<<<<<<<
   28708             :  * 
   28709             :  * np.import_array()
   28710             :  */
   28711           3 :   __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 11, __pyx_L1_error)
   28712           3 :   __Pyx_GOTREF(__pyx_t_7);
   28713           3 :   __Pyx_INCREF(__pyx_n_s_safe_downcast_indices);
   28714           3 :   __Pyx_GIVEREF(__pyx_n_s_safe_downcast_indices);
   28715           3 :   if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_safe_downcast_indices)) __PYX_ERR(0, 11, __pyx_L1_error);
   28716           3 :   __pyx_t_4 = __Pyx_Import(__pyx_n_s_tools, __pyx_t_7, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11, __pyx_L1_error)
   28717           3 :   __Pyx_GOTREF(__pyx_t_4);
   28718           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   28719           3 :   __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_safe_downcast_indices); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 11, __pyx_L1_error)
   28720           3 :   __Pyx_GOTREF(__pyx_t_7);
   28721           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_safe_downcast_indices, __pyx_t_7) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
   28722           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   28723           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   28724             : 
   28725             :   /* "scipy/sparse/csgraph/_matching.pyx":13
   28726             :  * from ._tools import _safe_downcast_indices
   28727             :  * 
   28728             :  * np.import_array()             # <<<<<<<<<<<<<<
   28729             :  * 
   28730             :  * include "parameters.pxi"
   28731             :  */
   28732           3 :   __pyx_t_9 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 13, __pyx_L1_error)
   28733             : 
   28734             :   /* "../scipy/sparse/csgraph/parameters.pxi":2
   28735             :  * 
   28736             :  * DTYPE = np.float64             # <<<<<<<<<<<<<<
   28737             :  * ctypedef np.float64_t DTYPE_t
   28738             :  * 
   28739             :  */
   28740           3 :   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 2, __pyx_L1_error)
   28741           3 :   __Pyx_GOTREF(__pyx_t_4);
   28742           3 :   __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float64); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 2, __pyx_L1_error)
   28743           3 :   __Pyx_GOTREF(__pyx_t_7);
   28744           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   28745           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_DTYPE, __pyx_t_7) < 0) __PYX_ERR(4, 2, __pyx_L1_error)
   28746           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   28747             : 
   28748             :   /* "../scipy/sparse/csgraph/parameters.pxi":5
   28749             :  * ctypedef np.float64_t DTYPE_t
   28750             :  * 
   28751             :  * ITYPE = np.int32             # <<<<<<<<<<<<<<
   28752             :  * ctypedef np.int32_t ITYPE_t
   28753             :  * 
   28754             :  */
   28755           3 :   __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 5, __pyx_L1_error)
   28756           3 :   __Pyx_GOTREF(__pyx_t_7);
   28757           3 :   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 5, __pyx_L1_error)
   28758           3 :   __Pyx_GOTREF(__pyx_t_4);
   28759           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   28760           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_ITYPE, __pyx_t_4) < 0) __PYX_ERR(4, 5, __pyx_L1_error)
   28761           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   28762             : 
   28763             :   /* "scipy/sparse/csgraph/_matching.pyx":18
   28764             :  * 
   28765             :  * 
   28766             :  * def maximum_bipartite_matching(graph, perm_type='row'):             # <<<<<<<<<<<<<<
   28767             :  *     r"""
   28768             :  *     maximum_bipartite_matching(graph, perm_type='row')
   28769             :  */
   28770           3 :   __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_6sparse_7csgraph_9_matching_1maximum_bipartite_matching, 0, __pyx_n_s_maximum_bipartite_matching, NULL, __pyx_n_s_scipy_sparse_csgraph__matching, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 18, __pyx_L1_error)
   28771           3 :   __Pyx_GOTREF(__pyx_t_4);
   28772           6 :   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__27);
   28773           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_maximum_bipartite_matching, __pyx_t_4) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
   28774           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   28775             : 
   28776             :   /* "scipy/sparse/csgraph/_matching.pyx":290
   28777             :  * 
   28778             :  * 
   28779             :  * def min_weight_full_bipartite_matching(biadjacency, maximize=False):             # <<<<<<<<<<<<<<
   28780             :  *     r"""
   28781             :  *     min_weight_full_bipartite_matching(biadjacency, maximize=False)
   28782             :  */
   28783           3 :   __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_6sparse_7csgraph_9_matching_3min_weight_full_bipartite_matching, 0, __pyx_n_s_min_weight_full_bipartite_matchi, NULL, __pyx_n_s_scipy_sparse_csgraph__matching, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 290, __pyx_L1_error)
   28784           3 :   __Pyx_GOTREF(__pyx_t_4);
   28785           6 :   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__31);
   28786           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_min_weight_full_bipartite_matchi, __pyx_t_4) < 0) __PYX_ERR(0, 290, __pyx_L1_error)
   28787           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   28788             : 
   28789             :   /* "scipy/sparse/csgraph/_matching.pyx":530
   28790             :  * 
   28791             :  * # We will use uint8 to represent booleans to simplify arrays of booleans below.
   28792             :  * BTYPE = np.uint8             # <<<<<<<<<<<<<<
   28793             :  * ctypedef np.uint8_t BTYPE_t
   28794             :  * 
   28795             :  */
   28796           3 :   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 530, __pyx_L1_error)
   28797           3 :   __Pyx_GOTREF(__pyx_t_4);
   28798           3 :   __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 530, __pyx_L1_error)
   28799           3 :   __Pyx_GOTREF(__pyx_t_7);
   28800           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   28801           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_BTYPE, __pyx_t_7) < 0) __PYX_ERR(0, 530, __pyx_L1_error)
   28802           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   28803             : 
   28804             :   /* "scipy/sparse/csgraph/_matching.pyx":1
   28805             :  * import warnings             # <<<<<<<<<<<<<<
   28806             :  * 
   28807             :  * cimport cython
   28808             :  */
   28809           3 :   __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1, __pyx_L1_error)
   28810           3 :   __Pyx_GOTREF(__pyx_t_7);
   28811           3 :   if (PyDict_SetItem(__pyx_t_7, __pyx_kp_u_maximum_bipartite_matching_line, __pyx_kp_u_maximum_bipartite_matching_grap) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   28812           3 :   if (PyDict_SetItem(__pyx_t_7, __pyx_kp_u_min_weight_full_bipartite_matchi_2, __pyx_kp_u_min_weight_full_bipartite_match) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   28813           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_7) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   28814           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   28815             : 
   28816             :   /*--- Wrapped vars code ---*/
   28817             : 
   28818           3 :   goto __pyx_L0;
   28819           0 :   __pyx_L1_error:;
   28820           0 :   __Pyx_XDECREF(__pyx_t_4);
   28821           0 :   __Pyx_XDECREF(__pyx_t_5);
   28822           0 :   __Pyx_XDECREF(__pyx_t_7);
   28823           0 :   if (__pyx_m) {
   28824           0 :     if (__pyx_d && stringtab_initialized) {
   28825           0 :       __Pyx_AddTraceback("init scipy.sparse.csgraph._matching", __pyx_clineno, __pyx_lineno, __pyx_filename);
   28826             :     }
   28827             :     #if !CYTHON_USE_MODULE_STATE
   28828           0 :     Py_CLEAR(__pyx_m);
   28829             :     #else
   28830             :     Py_DECREF(__pyx_m);
   28831             :     if (pystate_addmodule_run) {
   28832             :       PyObject *tp, *value, *tb;
   28833             :       PyErr_Fetch(&tp, &value, &tb);
   28834             :       PyState_RemoveModule(&__pyx_moduledef);
   28835             :       PyErr_Restore(tp, value, tb);
   28836             :     }
   28837             :     #endif
   28838           0 :   } else if (!PyErr_Occurred()) {
   28839           0 :     PyErr_SetString(PyExc_ImportError, "init scipy.sparse.csgraph._matching");
   28840             :   }
   28841           0 :   __pyx_L0:;
   28842           3 :   __Pyx_RefNannyFinishContext();
   28843             :   #if CYTHON_PEP489_MULTI_PHASE_INIT
   28844           3 :   return (__pyx_m != NULL) ? 0 : -1;
   28845             :   #elif PY_MAJOR_VERSION >= 3
   28846             :   return __pyx_m;
   28847             :   #else
   28848             :   return;
   28849             :   #endif
   28850             : }
   28851             : /* #### Code section: cleanup_globals ### */
   28852             : /* #### Code section: cleanup_module ### */
   28853             : /* #### Code section: main_method ### */
   28854             : /* #### Code section: utility_code_pragmas ### */
   28855             : #ifdef _MSC_VER
   28856             : #pragma warning( push )
   28857             : /* Warning 4127: conditional expression is constant
   28858             :  * Cython uses constant conditional expressions to allow in inline functions to be optimized at
   28859             :  * compile-time, so this warning is not useful
   28860             :  */
   28861             : #pragma warning( disable : 4127 )
   28862             : #endif
   28863             : 
   28864             : 
   28865             : 
   28866             : /* #### Code section: utility_code_def ### */
   28867             : 
   28868             : /* --- Runtime support code --- */
   28869             : /* Refnanny */
   28870             : #if CYTHON_REFNANNY
   28871             : static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
   28872             :     PyObject *m = NULL, *p = NULL;
   28873             :     void *r = NULL;
   28874             :     m = PyImport_ImportModule(modname);
   28875             :     if (!m) goto end;
   28876             :     p = PyObject_GetAttrString(m, "RefNannyAPI");
   28877             :     if (!p) goto end;
   28878             :     r = PyLong_AsVoidPtr(p);
   28879             : end:
   28880             :     Py_XDECREF(p);
   28881             :     Py_XDECREF(m);
   28882             :     return (__Pyx_RefNannyAPIStruct *)r;
   28883             : }
   28884             : #endif
   28885             : 
   28886             : /* PyErrExceptionMatches */
   28887             : #if CYTHON_FAST_THREAD_STATE
   28888           0 : static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
   28889           0 :     Py_ssize_t i, n;
   28890           0 :     n = PyTuple_GET_SIZE(tuple);
   28891             : #if PY_MAJOR_VERSION >= 3
   28892           0 :     for (i=0; i<n; i++) {
   28893           0 :         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
   28894             :     }
   28895             : #endif
   28896           0 :     for (i=0; i<n; i++) {
   28897           0 :         if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
   28898             :     }
   28899             :     return 0;
   28900             : }
   28901           9 : static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
   28902           9 :     int result;
   28903           9 :     PyObject *exc_type;
   28904             : #if PY_VERSION_HEX >= 0x030C00A6
   28905           9 :     PyObject *current_exception = tstate->current_exception;
   28906           9 :     if (unlikely(!current_exception)) return 0;
   28907           9 :     exc_type = (PyObject*) Py_TYPE(current_exception);
   28908           9 :     if (exc_type == err) return 1;
   28909             : #else
   28910             :     exc_type = tstate->curexc_type;
   28911             :     if (exc_type == err) return 1;
   28912             :     if (unlikely(!exc_type)) return 0;
   28913             : #endif
   28914             :     #if CYTHON_AVOID_BORROWED_REFS
   28915             :     Py_INCREF(exc_type);
   28916             :     #endif
   28917           0 :     if (unlikely(PyTuple_Check(err))) {
   28918           0 :         result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
   28919             :     } else {
   28920           0 :         result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
   28921             :     }
   28922             :     #if CYTHON_AVOID_BORROWED_REFS
   28923             :     Py_DECREF(exc_type);
   28924             :     #endif
   28925             :     return result;
   28926             : }
   28927             : #endif
   28928             : 
   28929             : /* PyErrFetchRestore */
   28930             : #if CYTHON_FAST_THREAD_STATE
   28931          56 : static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
   28932             : #if PY_VERSION_HEX >= 0x030C00A6
   28933          56 :     PyObject *tmp_value;
   28934          56 :     assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
   28935          56 :     if (value) {
   28936             :         #if CYTHON_COMPILING_IN_CPYTHON
   28937          47 :         if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
   28938             :         #endif
   28939           0 :             PyException_SetTraceback(value, tb);
   28940             :     }
   28941          56 :     tmp_value = tstate->current_exception;
   28942          56 :     tstate->current_exception = value;
   28943          56 :     Py_XDECREF(tmp_value);
   28944          56 :     Py_XDECREF(type);
   28945          56 :     Py_XDECREF(tb);
   28946             : #else
   28947             :     PyObject *tmp_type, *tmp_value, *tmp_tb;
   28948             :     tmp_type = tstate->curexc_type;
   28949             :     tmp_value = tstate->curexc_value;
   28950             :     tmp_tb = tstate->curexc_traceback;
   28951             :     tstate->curexc_type = type;
   28952             :     tstate->curexc_value = value;
   28953             :     tstate->curexc_traceback = tb;
   28954             :     Py_XDECREF(tmp_type);
   28955             :     Py_XDECREF(tmp_value);
   28956             :     Py_XDECREF(tmp_tb);
   28957             : #endif
   28958          56 : }
   28959          47 : static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
   28960             : #if PY_VERSION_HEX >= 0x030C00A6
   28961          47 :     PyObject* exc_value;
   28962          47 :     exc_value = tstate->current_exception;
   28963          47 :     tstate->current_exception = 0;
   28964          47 :     *value = exc_value;
   28965          47 :     *type = NULL;
   28966          47 :     *tb = NULL;
   28967          47 :     if (exc_value) {
   28968          47 :         *type = (PyObject*) Py_TYPE(exc_value);
   28969          47 :         Py_INCREF(*type);
   28970             :         #if CYTHON_COMPILING_IN_CPYTHON
   28971          47 :         *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
   28972          47 :         Py_XINCREF(*tb);
   28973             :         #else
   28974             :         *tb = PyException_GetTraceback(exc_value);
   28975             :         #endif
   28976             :     }
   28977             : #else
   28978             :     *type = tstate->curexc_type;
   28979             :     *value = tstate->curexc_value;
   28980             :     *tb = tstate->curexc_traceback;
   28981             :     tstate->curexc_type = 0;
   28982             :     tstate->curexc_value = 0;
   28983             :     tstate->curexc_traceback = 0;
   28984             : #endif
   28985          47 : }
   28986             : #endif
   28987             : 
   28988             : /* PyObjectGetAttrStr */
   28989             : #if CYTHON_USE_TYPE_SLOTS
   28990        4615 : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
   28991        4615 :     PyTypeObject* tp = Py_TYPE(obj);
   28992        4615 :     if (likely(tp->tp_getattro))
   28993        4615 :         return tp->tp_getattro(obj, attr_name);
   28994             : #if PY_MAJOR_VERSION < 3
   28995             :     if (likely(tp->tp_getattr))
   28996             :         return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
   28997             : #endif
   28998           0 :     return PyObject_GetAttr(obj, attr_name);
   28999             : }
   29000             : #endif
   29001             : 
   29002             : /* PyObjectGetAttrStrNoError */
   29003             : #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
   29004           9 : static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
   29005           9 :     __Pyx_PyThreadState_declare
   29006           9 :     __Pyx_PyThreadState_assign
   29007           9 :     if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
   29008           9 :         __Pyx_PyErr_Clear();
   29009           9 : }
   29010             : #endif
   29011          87 : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
   29012          87 :     PyObject *result;
   29013             : #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
   29014             :     (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
   29015             :     return result;
   29016             : #else
   29017             : #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
   29018          87 :     PyTypeObject* tp = Py_TYPE(obj);
   29019          87 :     if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
   29020          12 :         return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
   29021             :     }
   29022             : #endif
   29023          75 :     result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
   29024          75 :     if (unlikely(!result)) {
   29025           9 :         __Pyx_PyObject_GetAttrStr_ClearAttributeError();
   29026             :     }
   29027             :     return result;
   29028             : #endif
   29029             : }
   29030             : 
   29031             : /* GetBuiltinName */
   29032          33 : static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
   29033          33 :     PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name);
   29034          33 :     if (unlikely(!result) && !PyErr_Occurred()) {
   29035           0 :         PyErr_Format(PyExc_NameError,
   29036             : #if PY_MAJOR_VERSION >= 3
   29037             :             "name '%U' is not defined", name);
   29038             : #else
   29039             :             "name '%.200s' is not defined", PyString_AS_STRING(name));
   29040             : #endif
   29041             :     }
   29042          33 :     return result;
   29043             : }
   29044             : 
   29045             : /* TupleAndListFromArray */
   29046             : #if CYTHON_COMPILING_IN_CPYTHON
   29047             : static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
   29048             :     PyObject *v;
   29049             :     Py_ssize_t i;
   29050             :     for (i = 0; i < length; i++) {
   29051             :         v = dest[i] = src[i];
   29052             :         Py_INCREF(v);
   29053             :     }
   29054             : }
   29055             : static CYTHON_INLINE PyObject *
   29056             : __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
   29057             : {
   29058             :     PyObject *res;
   29059             :     if (n <= 0) {
   29060             :         Py_INCREF(__pyx_empty_tuple);
   29061             :         return __pyx_empty_tuple;
   29062             :     }
   29063             :     res = PyTuple_New(n);
   29064             :     if (unlikely(res == NULL)) return NULL;
   29065             :     __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
   29066             :     return res;
   29067             : }
   29068             : static CYTHON_INLINE PyObject *
   29069             : __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
   29070             : {
   29071             :     PyObject *res;
   29072             :     if (n <= 0) {
   29073             :         return PyList_New(0);
   29074             :     }
   29075             :     res = PyList_New(n);
   29076             :     if (unlikely(res == NULL)) return NULL;
   29077             :     __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
   29078             :     return res;
   29079             : }
   29080             : #endif
   29081             : 
   29082             : /* BytesEquals */
   29083             : static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
   29084             : #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
   29085             :     return PyObject_RichCompareBool(s1, s2, equals);
   29086             : #else
   29087             :     if (s1 == s2) {
   29088             :         return (equals == Py_EQ);
   29089             :     } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
   29090             :         const char *ps1, *ps2;
   29091             :         Py_ssize_t length = PyBytes_GET_SIZE(s1);
   29092             :         if (length != PyBytes_GET_SIZE(s2))
   29093             :             return (equals == Py_NE);
   29094             :         ps1 = PyBytes_AS_STRING(s1);
   29095             :         ps2 = PyBytes_AS_STRING(s2);
   29096             :         if (ps1[0] != ps2[0]) {
   29097             :             return (equals == Py_NE);
   29098             :         } else if (length == 1) {
   29099             :             return (equals == Py_EQ);
   29100             :         } else {
   29101             :             int result;
   29102             : #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
   29103             :             Py_hash_t hash1, hash2;
   29104             :             hash1 = ((PyBytesObject*)s1)->ob_shash;
   29105             :             hash2 = ((PyBytesObject*)s2)->ob_shash;
   29106             :             if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
   29107             :                 return (equals == Py_NE);
   29108             :             }
   29109             : #endif
   29110             :             result = memcmp(ps1, ps2, (size_t)length);
   29111             :             return (equals == Py_EQ) ? (result == 0) : (result != 0);
   29112             :         }
   29113             :     } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
   29114             :         return (equals == Py_NE);
   29115             :     } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
   29116             :         return (equals == Py_NE);
   29117             :     } else {
   29118             :         int result;
   29119             :         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
   29120             :         if (!py_result)
   29121             :             return -1;
   29122             :         result = __Pyx_PyObject_IsTrue(py_result);
   29123             :         Py_DECREF(py_result);
   29124             :         return result;
   29125             :     }
   29126             : #endif
   29127             : }
   29128             : 
   29129             : /* UnicodeEquals */
   29130         270 : static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
   29131             : #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
   29132             :     return PyObject_RichCompareBool(s1, s2, equals);
   29133             : #else
   29134             : #if PY_MAJOR_VERSION < 3
   29135             :     PyObject* owned_ref = NULL;
   29136             : #endif
   29137         270 :     int s1_is_unicode, s2_is_unicode;
   29138         270 :     if (s1 == s2) {
   29139         254 :         goto return_eq;
   29140             :     }
   29141          16 :     s1_is_unicode = PyUnicode_CheckExact(s1);
   29142          16 :     s2_is_unicode = PyUnicode_CheckExact(s2);
   29143             : #if PY_MAJOR_VERSION < 3
   29144             :     if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
   29145             :         owned_ref = PyUnicode_FromObject(s2);
   29146             :         if (unlikely(!owned_ref))
   29147             :             return -1;
   29148             :         s2 = owned_ref;
   29149             :         s2_is_unicode = 1;
   29150             :     } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
   29151             :         owned_ref = PyUnicode_FromObject(s1);
   29152             :         if (unlikely(!owned_ref))
   29153             :             return -1;
   29154             :         s1 = owned_ref;
   29155             :         s1_is_unicode = 1;
   29156             :     } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
   29157             :         return __Pyx_PyBytes_Equals(s1, s2, equals);
   29158             :     }
   29159             : #endif
   29160          16 :     if (s1_is_unicode & s2_is_unicode) {
   29161          16 :         Py_ssize_t length;
   29162          16 :         int kind;
   29163          16 :         void *data1, *data2;
   29164          16 :         if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
   29165             :             return -1;
   29166          16 :         length = __Pyx_PyUnicode_GET_LENGTH(s1);
   29167          16 :         if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
   29168          14 :             goto return_ne;
   29169             :         }
   29170             : #if CYTHON_USE_UNICODE_INTERNALS
   29171             :         {
   29172           2 :             Py_hash_t hash1, hash2;
   29173             :         #if CYTHON_PEP393_ENABLED
   29174           2 :             hash1 = ((PyASCIIObject*)s1)->hash;
   29175           2 :             hash2 = ((PyASCIIObject*)s2)->hash;
   29176             :         #else
   29177             :             hash1 = ((PyUnicodeObject*)s1)->hash;
   29178             :             hash2 = ((PyUnicodeObject*)s2)->hash;
   29179             :         #endif
   29180           2 :             if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
   29181           2 :                 goto return_ne;
   29182             :             }
   29183             :         }
   29184             : #endif
   29185           0 :         kind = __Pyx_PyUnicode_KIND(s1);
   29186           0 :         if (kind != __Pyx_PyUnicode_KIND(s2)) {
   29187           0 :             goto return_ne;
   29188             :         }
   29189           0 :         data1 = __Pyx_PyUnicode_DATA(s1);
   29190           0 :         data2 = __Pyx_PyUnicode_DATA(s2);
   29191           0 :         if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
   29192           0 :             goto return_ne;
   29193           0 :         } else if (length == 1) {
   29194           0 :             goto return_eq;
   29195             :         } else {
   29196           0 :             int result = memcmp(data1, data2, (size_t)(length * kind));
   29197             :             #if PY_MAJOR_VERSION < 3
   29198             :             Py_XDECREF(owned_ref);
   29199             :             #endif
   29200           0 :             return (equals == Py_EQ) ? (result == 0) : (result != 0);
   29201             :         }
   29202           0 :     } else if ((s1 == Py_None) & s2_is_unicode) {
   29203           0 :         goto return_ne;
   29204           0 :     } else if ((s2 == Py_None) & s1_is_unicode) {
   29205           0 :         goto return_ne;
   29206             :     } else {
   29207           0 :         int result;
   29208           0 :         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
   29209             :         #if PY_MAJOR_VERSION < 3
   29210             :         Py_XDECREF(owned_ref);
   29211             :         #endif
   29212           0 :         if (!py_result)
   29213             :             return -1;
   29214           0 :         result = __Pyx_PyObject_IsTrue(py_result);
   29215           0 :         Py_DECREF(py_result);
   29216           0 :         return result;
   29217             :     }
   29218         254 : return_eq:
   29219             :     #if PY_MAJOR_VERSION < 3
   29220             :     Py_XDECREF(owned_ref);
   29221             :     #endif
   29222         254 :     return (equals == Py_EQ);
   29223          16 : return_ne:
   29224             :     #if PY_MAJOR_VERSION < 3
   29225             :     Py_XDECREF(owned_ref);
   29226             :     #endif
   29227          16 :     return (equals == Py_NE);
   29228             : #endif
   29229             : }
   29230             : 
   29231             : /* fastcall */
   29232             : #if CYTHON_METH_FASTCALL
   29233          20 : static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
   29234             : {
   29235          20 :     Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames);
   29236          20 :     for (i = 0; i < n; i++)
   29237             :     {
   29238          20 :         if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i];
   29239             :     }
   29240           0 :     for (i = 0; i < n; i++)
   29241             :     {
   29242           0 :         int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ);
   29243           0 :         if (unlikely(eq != 0)) {
   29244           0 :             if (unlikely(eq < 0)) return NULL;
   29245           0 :             return kwvalues[i];
   29246             :         }
   29247             :     }
   29248             :     return NULL;
   29249             : }
   29250             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
   29251             : CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
   29252             :     Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames);
   29253             :     PyObject *dict;
   29254             :     dict = PyDict_New();
   29255             :     if (unlikely(!dict))
   29256             :         return NULL;
   29257             :     for (i=0; i<nkwargs; i++) {
   29258             :         PyObject *key = PyTuple_GET_ITEM(kwnames, i);
   29259             :         if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
   29260             :             goto bad;
   29261             :     }
   29262             :     return dict;
   29263             : bad:
   29264             :     Py_DECREF(dict);
   29265             :     return NULL;
   29266             : }
   29267             : #endif
   29268             : #endif
   29269             : 
   29270             : /* RaiseArgTupleInvalid */
   29271           0 : static void __Pyx_RaiseArgtupleInvalid(
   29272             :     const char* func_name,
   29273             :     int exact,
   29274             :     Py_ssize_t num_min,
   29275             :     Py_ssize_t num_max,
   29276             :     Py_ssize_t num_found)
   29277             : {
   29278           0 :     Py_ssize_t num_expected;
   29279           0 :     const char *more_or_less;
   29280           0 :     if (num_found < num_min) {
   29281             :         num_expected = num_min;
   29282             :         more_or_less = "at least";
   29283             :     } else {
   29284           0 :         num_expected = num_max;
   29285           0 :         more_or_less = "at most";
   29286             :     }
   29287           0 :     if (exact) {
   29288           0 :         more_or_less = "exactly";
   29289             :     }
   29290           0 :     PyErr_Format(PyExc_TypeError,
   29291             :                  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
   29292             :                  func_name, more_or_less, num_expected,
   29293             :                  (num_expected == 1) ? "" : "s", num_found);
   29294           0 : }
   29295             : 
   29296             : /* RaiseDoubleKeywords */
   29297           0 : static void __Pyx_RaiseDoubleKeywordsError(
   29298             :     const char* func_name,
   29299             :     PyObject* kw_name)
   29300             : {
   29301           0 :     PyErr_Format(PyExc_TypeError,
   29302             :         #if PY_MAJOR_VERSION >= 3
   29303             :         "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
   29304             :         #else
   29305             :         "%s() got multiple values for keyword argument '%s'", func_name,
   29306             :         PyString_AsString(kw_name));
   29307             :         #endif
   29308             : }
   29309             : 
   29310             : /* ParseKeywords */
   29311           0 : static int __Pyx_ParseOptionalKeywords(
   29312             :     PyObject *kwds,
   29313             :     PyObject *const *kwvalues,
   29314             :     PyObject **argnames[],
   29315             :     PyObject *kwds2,
   29316             :     PyObject *values[],
   29317             :     Py_ssize_t num_pos_args,
   29318             :     const char* function_name)
   29319             : {
   29320           0 :     PyObject *key = 0, *value = 0;
   29321           0 :     Py_ssize_t pos = 0;
   29322           0 :     PyObject*** name;
   29323           0 :     PyObject*** first_kw_arg = argnames + num_pos_args;
   29324           0 :     int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds));
   29325           0 :     while (1) {
   29326           0 :         Py_XDECREF(key); key = NULL;
   29327           0 :         Py_XDECREF(value); value = NULL;
   29328           0 :         if (kwds_is_tuple) {
   29329           0 :             Py_ssize_t size;
   29330             : #if CYTHON_ASSUME_SAFE_MACROS
   29331           0 :             size = PyTuple_GET_SIZE(kwds);
   29332             : #else
   29333             :             size = PyTuple_Size(kwds);
   29334             :             if (size < 0) goto bad;
   29335             : #endif
   29336           0 :             if (pos >= size) break;
   29337             : #if CYTHON_AVOID_BORROWED_REFS
   29338             :             key = __Pyx_PySequence_ITEM(kwds, pos);
   29339             :             if (!key) goto bad;
   29340             : #elif CYTHON_ASSUME_SAFE_MACROS
   29341           0 :             key = PyTuple_GET_ITEM(kwds, pos);
   29342             : #else
   29343             :             key = PyTuple_GetItem(kwds, pos);
   29344             :             if (!key) goto bad;
   29345             : #endif
   29346           0 :             value = kwvalues[pos];
   29347           0 :             pos++;
   29348             :         }
   29349             :         else
   29350             :         {
   29351           0 :             if (!PyDict_Next(kwds, &pos, &key, &value)) break;
   29352             : #if CYTHON_AVOID_BORROWED_REFS
   29353             :             Py_INCREF(key);
   29354             : #endif
   29355             :         }
   29356           0 :         name = first_kw_arg;
   29357           0 :         while (*name && (**name != key)) name++;
   29358           0 :         if (*name) {
   29359           0 :             values[name-argnames] = value;
   29360             : #if CYTHON_AVOID_BORROWED_REFS
   29361             :             Py_INCREF(value);
   29362             :             Py_DECREF(key);
   29363             : #endif
   29364           0 :             key = NULL;
   29365           0 :             value = NULL;
   29366           0 :             continue;
   29367             :         }
   29368             : #if !CYTHON_AVOID_BORROWED_REFS
   29369           0 :         Py_INCREF(key);
   29370             : #endif
   29371           0 :         Py_INCREF(value);
   29372           0 :         name = first_kw_arg;
   29373             :         #if PY_MAJOR_VERSION < 3
   29374             :         if (likely(PyString_Check(key))) {
   29375             :             while (*name) {
   29376             :                 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
   29377             :                         && _PyString_Eq(**name, key)) {
   29378             :                     values[name-argnames] = value;
   29379             : #if CYTHON_AVOID_BORROWED_REFS
   29380             :                     value = NULL;
   29381             : #endif
   29382             :                     break;
   29383             :                 }
   29384             :                 name++;
   29385             :             }
   29386             :             if (*name) continue;
   29387             :             else {
   29388             :                 PyObject*** argname = argnames;
   29389             :                 while (argname != first_kw_arg) {
   29390             :                     if ((**argname == key) || (
   29391             :                             (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
   29392             :                              && _PyString_Eq(**argname, key))) {
   29393             :                         goto arg_passed_twice;
   29394             :                     }
   29395             :                     argname++;
   29396             :                 }
   29397             :             }
   29398             :         } else
   29399             :         #endif
   29400           0 :         if (likely(PyUnicode_Check(key))) {
   29401           0 :             while (*name) {
   29402           0 :                 int cmp = (
   29403             :                 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
   29404           0 :                     (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
   29405             :                 #endif
   29406           0 :                     PyUnicode_Compare(**name, key)
   29407             :                 );
   29408           0 :                 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
   29409           0 :                 if (cmp == 0) {
   29410           0 :                     values[name-argnames] = value;
   29411             : #if CYTHON_AVOID_BORROWED_REFS
   29412             :                     value = NULL;
   29413             : #endif
   29414           0 :                     break;
   29415             :                 }
   29416           0 :                 name++;
   29417             :             }
   29418           0 :             if (*name) continue;
   29419             :             else {
   29420             :                 PyObject*** argname = argnames;
   29421           0 :                 while (argname != first_kw_arg) {
   29422           0 :                     int cmp = (**argname == key) ? 0 :
   29423             :                     #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
   29424           0 :                         (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
   29425             :                     #endif
   29426           0 :                         PyUnicode_Compare(**argname, key);
   29427           0 :                     if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
   29428           0 :                     if (cmp == 0) goto arg_passed_twice;
   29429           0 :                     argname++;
   29430             :                 }
   29431             :             }
   29432             :         } else
   29433           0 :             goto invalid_keyword_type;
   29434           0 :         if (kwds2) {
   29435           0 :             if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
   29436             :         } else {
   29437           0 :             goto invalid_keyword;
   29438             :         }
   29439             :     }
   29440           0 :     Py_XDECREF(key);
   29441           0 :     Py_XDECREF(value);
   29442           0 :     return 0;
   29443           0 : arg_passed_twice:
   29444           0 :     __Pyx_RaiseDoubleKeywordsError(function_name, key);
   29445           0 :     goto bad;
   29446           0 : invalid_keyword_type:
   29447           0 :     PyErr_Format(PyExc_TypeError,
   29448             :         "%.200s() keywords must be strings", function_name);
   29449           0 :     goto bad;
   29450           0 : invalid_keyword:
   29451             :     #if PY_MAJOR_VERSION < 3
   29452             :     PyErr_Format(PyExc_TypeError,
   29453             :         "%.200s() got an unexpected keyword argument '%.200s'",
   29454             :         function_name, PyString_AsString(key));
   29455             :     #else
   29456           0 :     PyErr_Format(PyExc_TypeError,
   29457             :         "%s() got an unexpected keyword argument '%U'",
   29458             :         function_name, key);
   29459             :     #endif
   29460           0 : bad:
   29461           0 :     Py_XDECREF(key);
   29462           0 :     Py_XDECREF(value);
   29463           0 :     return -1;
   29464             : }
   29465             : 
   29466             : /* ArgTypeTest */
   29467           0 : static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
   29468             : {
   29469           0 :     __Pyx_TypeName type_name;
   29470           0 :     __Pyx_TypeName obj_type_name;
   29471           0 :     if (unlikely(!type)) {
   29472           0 :         PyErr_SetString(PyExc_SystemError, "Missing type object");
   29473           0 :         return 0;
   29474             :     }
   29475           0 :     else if (exact) {
   29476             :         #if PY_MAJOR_VERSION == 2
   29477             :         if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
   29478             :         #endif
   29479             :     }
   29480             :     else {
   29481           0 :         if (likely(__Pyx_TypeCheck(obj, type))) return 1;
   29482             :     }
   29483           0 :     type_name = __Pyx_PyType_GetName(type);
   29484           0 :     obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   29485           0 :     PyErr_Format(PyExc_TypeError,
   29486             :         "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
   29487             :         ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name);
   29488           0 :     __Pyx_DECREF_TypeName(type_name);
   29489           0 :     __Pyx_DECREF_TypeName(obj_type_name);
   29490           0 :     return 0;
   29491             : }
   29492             : 
   29493             : /* RaiseException */
   29494             : #if PY_MAJOR_VERSION < 3
   29495             : static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
   29496             :     __Pyx_PyThreadState_declare
   29497             :     CYTHON_UNUSED_VAR(cause);
   29498             :     Py_XINCREF(type);
   29499             :     if (!value || value == Py_None)
   29500             :         value = NULL;
   29501             :     else
   29502             :         Py_INCREF(value);
   29503             :     if (!tb || tb == Py_None)
   29504             :         tb = NULL;
   29505             :     else {
   29506             :         Py_INCREF(tb);
   29507             :         if (!PyTraceBack_Check(tb)) {
   29508             :             PyErr_SetString(PyExc_TypeError,
   29509             :                 "raise: arg 3 must be a traceback or None");
   29510             :             goto raise_error;
   29511             :         }
   29512             :     }
   29513             :     if (PyType_Check(type)) {
   29514             : #if CYTHON_COMPILING_IN_PYPY
   29515             :         if (!value) {
   29516             :             Py_INCREF(Py_None);
   29517             :             value = Py_None;
   29518             :         }
   29519             : #endif
   29520             :         PyErr_NormalizeException(&type, &value, &tb);
   29521             :     } else {
   29522             :         if (value) {
   29523             :             PyErr_SetString(PyExc_TypeError,
   29524             :                 "instance exception may not have a separate value");
   29525             :             goto raise_error;
   29526             :         }
   29527             :         value = type;
   29528             :         type = (PyObject*) Py_TYPE(type);
   29529             :         Py_INCREF(type);
   29530             :         if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
   29531             :             PyErr_SetString(PyExc_TypeError,
   29532             :                 "raise: exception class must be a subclass of BaseException");
   29533             :             goto raise_error;
   29534             :         }
   29535             :     }
   29536             :     __Pyx_PyThreadState_assign
   29537             :     __Pyx_ErrRestore(type, value, tb);
   29538             :     return;
   29539             : raise_error:
   29540             :     Py_XDECREF(value);
   29541             :     Py_XDECREF(type);
   29542             :     Py_XDECREF(tb);
   29543             :     return;
   29544             : }
   29545             : #else
   29546          44 : static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
   29547          44 :     PyObject* owned_instance = NULL;
   29548          44 :     if (tb == Py_None) {
   29549             :         tb = 0;
   29550          44 :     } else if (tb && !PyTraceBack_Check(tb)) {
   29551           0 :         PyErr_SetString(PyExc_TypeError,
   29552             :             "raise: arg 3 must be a traceback or None");
   29553           0 :         goto bad;
   29554             :     }
   29555          44 :     if (value == Py_None)
   29556           0 :         value = 0;
   29557          44 :     if (PyExceptionInstance_Check(type)) {
   29558          44 :         if (value) {
   29559           0 :             PyErr_SetString(PyExc_TypeError,
   29560             :                 "instance exception may not have a separate value");
   29561           0 :             goto bad;
   29562             :         }
   29563             :         value = type;
   29564             :         type = (PyObject*) Py_TYPE(value);
   29565           0 :     } else if (PyExceptionClass_Check(type)) {
   29566           0 :         PyObject *instance_class = NULL;
   29567           0 :         if (value && PyExceptionInstance_Check(value)) {
   29568           0 :             instance_class = (PyObject*) Py_TYPE(value);
   29569           0 :             if (instance_class != type) {
   29570           0 :                 int is_subclass = PyObject_IsSubclass(instance_class, type);
   29571           0 :                 if (!is_subclass) {
   29572             :                     instance_class = NULL;
   29573           0 :                 } else if (unlikely(is_subclass == -1)) {
   29574           0 :                     goto bad;
   29575             :                 } else {
   29576             :                     type = instance_class;
   29577             :                 }
   29578             :             }
   29579             :         }
   29580             :         if (!instance_class) {
   29581           0 :             PyObject *args;
   29582           0 :             if (!value)
   29583           0 :                 args = PyTuple_New(0);
   29584           0 :             else if (PyTuple_Check(value)) {
   29585           0 :                 Py_INCREF(value);
   29586           0 :                 args = value;
   29587             :             } else
   29588           0 :                 args = PyTuple_Pack(1, value);
   29589           0 :             if (!args)
   29590           0 :                 goto bad;
   29591           0 :             owned_instance = PyObject_Call(type, args, NULL);
   29592           0 :             Py_DECREF(args);
   29593           0 :             if (!owned_instance)
   29594           0 :                 goto bad;
   29595           0 :             value = owned_instance;
   29596           0 :             if (!PyExceptionInstance_Check(value)) {
   29597           0 :                 PyErr_Format(PyExc_TypeError,
   29598             :                              "calling %R should have returned an instance of "
   29599             :                              "BaseException, not %R",
   29600             :                              type, Py_TYPE(value));
   29601           0 :                 goto bad;
   29602             :             }
   29603             :         }
   29604             :     } else {
   29605           0 :         PyErr_SetString(PyExc_TypeError,
   29606             :             "raise: exception class must be a subclass of BaseException");
   29607           0 :         goto bad;
   29608             :     }
   29609          44 :     if (cause) {
   29610           0 :         PyObject *fixed_cause;
   29611           0 :         if (cause == Py_None) {
   29612             :             fixed_cause = NULL;
   29613           0 :         } else if (PyExceptionClass_Check(cause)) {
   29614           0 :             fixed_cause = PyObject_CallObject(cause, NULL);
   29615           0 :             if (fixed_cause == NULL)
   29616           0 :                 goto bad;
   29617           0 :         } else if (PyExceptionInstance_Check(cause)) {
   29618           0 :             fixed_cause = cause;
   29619           0 :             Py_INCREF(fixed_cause);
   29620             :         } else {
   29621           0 :             PyErr_SetString(PyExc_TypeError,
   29622             :                             "exception causes must derive from "
   29623             :                             "BaseException");
   29624           0 :             goto bad;
   29625             :         }
   29626           0 :         PyException_SetCause(value, fixed_cause);
   29627             :     }
   29628          44 :     PyErr_SetObject(type, value);
   29629          44 :     if (tb) {
   29630             :       #if PY_VERSION_HEX >= 0x030C00A6
   29631           0 :         PyException_SetTraceback(value, tb);
   29632             :       #elif CYTHON_FAST_THREAD_STATE
   29633             :         PyThreadState *tstate = __Pyx_PyThreadState_Current;
   29634             :         PyObject* tmp_tb = tstate->curexc_traceback;
   29635             :         if (tb != tmp_tb) {
   29636             :             Py_INCREF(tb);
   29637             :             tstate->curexc_traceback = tb;
   29638             :             Py_XDECREF(tmp_tb);
   29639             :         }
   29640             : #else
   29641             :         PyObject *tmp_type, *tmp_value, *tmp_tb;
   29642             :         PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
   29643             :         Py_INCREF(tb);
   29644             :         PyErr_Restore(tmp_type, tmp_value, tb);
   29645             :         Py_XDECREF(tmp_tb);
   29646             : #endif
   29647             :     }
   29648          44 : bad:
   29649          44 :     Py_XDECREF(owned_instance);
   29650          44 :     return;
   29651             : }
   29652             : #endif
   29653             : 
   29654             : /* PyFunctionFastCall */
   29655             : #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
   29656             : static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
   29657             :                                                PyObject *globals) {
   29658             :     PyFrameObject *f;
   29659             :     PyThreadState *tstate = __Pyx_PyThreadState_Current;
   29660             :     PyObject **fastlocals;
   29661             :     Py_ssize_t i;
   29662             :     PyObject *result;
   29663             :     assert(globals != NULL);
   29664             :     /* XXX Perhaps we should create a specialized
   29665             :        PyFrame_New() that doesn't take locals, but does
   29666             :        take builtins without sanity checking them.
   29667             :        */
   29668             :     assert(tstate != NULL);
   29669             :     f = PyFrame_New(tstate, co, globals, NULL);
   29670             :     if (f == NULL) {
   29671             :         return NULL;
   29672             :     }
   29673             :     fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
   29674             :     for (i = 0; i < na; i++) {
   29675             :         Py_INCREF(*args);
   29676             :         fastlocals[i] = *args++;
   29677             :     }
   29678             :     result = PyEval_EvalFrameEx(f,0);
   29679             :     ++tstate->recursion_depth;
   29680             :     Py_DECREF(f);
   29681             :     --tstate->recursion_depth;
   29682             :     return result;
   29683             : }
   29684             : static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
   29685             :     PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
   29686             :     PyObject *globals = PyFunction_GET_GLOBALS(func);
   29687             :     PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
   29688             :     PyObject *closure;
   29689             : #if PY_MAJOR_VERSION >= 3
   29690             :     PyObject *kwdefs;
   29691             : #endif
   29692             :     PyObject *kwtuple, **k;
   29693             :     PyObject **d;
   29694             :     Py_ssize_t nd;
   29695             :     Py_ssize_t nk;
   29696             :     PyObject *result;
   29697             :     assert(kwargs == NULL || PyDict_Check(kwargs));
   29698             :     nk = kwargs ? PyDict_Size(kwargs) : 0;
   29699             :     #if PY_MAJOR_VERSION < 3
   29700             :     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) {
   29701             :         return NULL;
   29702             :     }
   29703             :     #else
   29704             :     if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
   29705             :         return NULL;
   29706             :     }
   29707             :     #endif
   29708             :     if (
   29709             : #if PY_MAJOR_VERSION >= 3
   29710             :             co->co_kwonlyargcount == 0 &&
   29711             : #endif
   29712             :             likely(kwargs == NULL || nk == 0) &&
   29713             :             co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
   29714             :         if (argdefs == NULL && co->co_argcount == nargs) {
   29715             :             result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
   29716             :             goto done;
   29717             :         }
   29718             :         else if (nargs == 0 && argdefs != NULL
   29719             :                  && co->co_argcount == Py_SIZE(argdefs)) {
   29720             :             /* function called with no arguments, but all parameters have
   29721             :                a default value: use default values as arguments .*/
   29722             :             args = &PyTuple_GET_ITEM(argdefs, 0);
   29723             :             result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
   29724             :             goto done;
   29725             :         }
   29726             :     }
   29727             :     if (kwargs != NULL) {
   29728             :         Py_ssize_t pos, i;
   29729             :         kwtuple = PyTuple_New(2 * nk);
   29730             :         if (kwtuple == NULL) {
   29731             :             result = NULL;
   29732             :             goto done;
   29733             :         }
   29734             :         k = &PyTuple_GET_ITEM(kwtuple, 0);
   29735             :         pos = i = 0;
   29736             :         while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
   29737             :             Py_INCREF(k[i]);
   29738             :             Py_INCREF(k[i+1]);
   29739             :             i += 2;
   29740             :         }
   29741             :         nk = i / 2;
   29742             :     }
   29743             :     else {
   29744             :         kwtuple = NULL;
   29745             :         k = NULL;
   29746             :     }
   29747             :     closure = PyFunction_GET_CLOSURE(func);
   29748             : #if PY_MAJOR_VERSION >= 3
   29749             :     kwdefs = PyFunction_GET_KW_DEFAULTS(func);
   29750             : #endif
   29751             :     if (argdefs != NULL) {
   29752             :         d = &PyTuple_GET_ITEM(argdefs, 0);
   29753             :         nd = Py_SIZE(argdefs);
   29754             :     }
   29755             :     else {
   29756             :         d = NULL;
   29757             :         nd = 0;
   29758             :     }
   29759             : #if PY_MAJOR_VERSION >= 3
   29760             :     result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
   29761             :                                args, (int)nargs,
   29762             :                                k, (int)nk,
   29763             :                                d, (int)nd, kwdefs, closure);
   29764             : #else
   29765             :     result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
   29766             :                                args, (int)nargs,
   29767             :                                k, (int)nk,
   29768             :                                d, (int)nd, closure);
   29769             : #endif
   29770             :     Py_XDECREF(kwtuple);
   29771             : done:
   29772             :     Py_LeaveRecursiveCall();
   29773             :     return result;
   29774             : }
   29775             : #endif
   29776             : 
   29777             : /* PyObjectCall */
   29778             : #if CYTHON_COMPILING_IN_CPYTHON
   29779        3520 : static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
   29780        3520 :     PyObject *result;
   29781        3520 :     ternaryfunc call = Py_TYPE(func)->tp_call;
   29782        3520 :     if (unlikely(!call))
   29783           0 :         return PyObject_Call(func, arg, kw);
   29784             :     #if PY_MAJOR_VERSION < 3
   29785             :     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
   29786             :         return NULL;
   29787             :     #else
   29788        3520 :     if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
   29789             :         return NULL;
   29790             :     #endif
   29791        3520 :     result = (*call)(func, arg, kw);
   29792        3520 :     Py_LeaveRecursiveCall();
   29793        3520 :     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
   29794           0 :         PyErr_SetString(
   29795             :             PyExc_SystemError,
   29796             :             "NULL result without error in PyObject_Call");
   29797             :     }
   29798             :     return result;
   29799             : }
   29800             : #endif
   29801             : 
   29802             : /* PyObjectCallMethO */
   29803             : #if CYTHON_COMPILING_IN_CPYTHON
   29804           0 : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
   29805           0 :     PyObject *self, *result;
   29806           0 :     PyCFunction cfunc;
   29807           0 :     cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
   29808           0 :     self = __Pyx_CyOrPyCFunction_GET_SELF(func);
   29809             :     #if PY_MAJOR_VERSION < 3
   29810             :     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
   29811             :         return NULL;
   29812             :     #else
   29813           0 :     if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
   29814             :         return NULL;
   29815             :     #endif
   29816           0 :     result = cfunc(self, arg);
   29817           0 :     Py_LeaveRecursiveCall();
   29818           0 :     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
   29819           0 :         PyErr_SetString(
   29820             :             PyExc_SystemError,
   29821             :             "NULL result without error in PyObject_Call");
   29822             :     }
   29823             :     return result;
   29824             : }
   29825             : #endif
   29826             : 
   29827             : /* PyObjectFastCall */
   29828             : #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
   29829             : static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) {
   29830             :     PyObject *argstuple;
   29831             :     PyObject *result = 0;
   29832             :     size_t i;
   29833             :     argstuple = PyTuple_New((Py_ssize_t)nargs);
   29834             :     if (unlikely(!argstuple)) return NULL;
   29835             :     for (i = 0; i < nargs; i++) {
   29836             :         Py_INCREF(args[i]);
   29837             :         if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad;
   29838             :     }
   29839             :     result = __Pyx_PyObject_Call(func, argstuple, kwargs);
   29840             :   bad:
   29841             :     Py_DECREF(argstuple);
   29842             :     return result;
   29843             : }
   29844             : #endif
   29845        1667 : static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) {
   29846        1667 :     Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
   29847             : #if CYTHON_COMPILING_IN_CPYTHON
   29848        1667 :     if (nargs == 0 && kwargs == NULL) {
   29849           0 :         if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
   29850           0 :             return __Pyx_PyObject_CallMethO(func, NULL);
   29851             :     }
   29852        1667 :     else if (nargs == 1 && kwargs == NULL) {
   29853        1445 :         if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
   29854           0 :             return __Pyx_PyObject_CallMethO(func, args[0]);
   29855             :     }
   29856             : #endif
   29857             :     #if PY_VERSION_HEX < 0x030800B1
   29858             :     #if CYTHON_FAST_PYCCALL
   29859             :     if (PyCFunction_Check(func)) {
   29860             :         if (kwargs) {
   29861             :             return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
   29862             :         } else {
   29863             :             return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
   29864             :         }
   29865             :     }
   29866             :     #if PY_VERSION_HEX >= 0x030700A1
   29867             :     if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
   29868             :         return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
   29869             :     }
   29870             :     #endif
   29871             :     #endif
   29872             :     #if CYTHON_FAST_PYCALL
   29873             :     if (PyFunction_Check(func)) {
   29874             :         return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
   29875             :     }
   29876             :     #endif
   29877             :     #endif
   29878        1667 :     if (kwargs == NULL) {
   29879             :         #if CYTHON_VECTORCALL
   29880             :         #if PY_VERSION_HEX < 0x03090000
   29881             :         vectorcallfunc f = _PyVectorcall_Function(func);
   29882             :         #else
   29883        1667 :         vectorcallfunc f = PyVectorcall_Function(func);
   29884             :         #endif
   29885        1667 :         if (f) {
   29886        1532 :             return f(func, args, (size_t)nargs, NULL);
   29887             :         }
   29888             :         #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
   29889             :         if (__Pyx_CyFunction_CheckExact(func)) {
   29890             :             __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
   29891             :             if (f) return f(func, args, (size_t)nargs, NULL);
   29892             :         }
   29893             :         #endif
   29894             :     }
   29895         135 :     if (nargs == 0) {
   29896           0 :         return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs);
   29897             :     }
   29898             :     #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
   29899         135 :     return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
   29900             :     #else
   29901             :     return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
   29902             :     #endif
   29903             : }
   29904             : 
   29905             : /* RaiseUnexpectedTypeError */
   29906             : static int
   29907           0 : __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
   29908             : {
   29909           0 :     __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   29910           0 :     PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
   29911             :                  expected, obj_type_name);
   29912           0 :     __Pyx_DECREF_TypeName(obj_type_name);
   29913           0 :     return 0;
   29914             : }
   29915             : 
   29916             : /* CIntToDigits */
   29917             : static const char DIGIT_PAIRS_10[2*10*10+1] = {
   29918             :     "00010203040506070809"
   29919             :     "10111213141516171819"
   29920             :     "20212223242526272829"
   29921             :     "30313233343536373839"
   29922             :     "40414243444546474849"
   29923             :     "50515253545556575859"
   29924             :     "60616263646566676869"
   29925             :     "70717273747576777879"
   29926             :     "80818283848586878889"
   29927             :     "90919293949596979899"
   29928             : };
   29929             : static const char DIGIT_PAIRS_8[2*8*8+1] = {
   29930             :     "0001020304050607"
   29931             :     "1011121314151617"
   29932             :     "2021222324252627"
   29933             :     "3031323334353637"
   29934             :     "4041424344454647"
   29935             :     "5051525354555657"
   29936             :     "6061626364656667"
   29937             :     "7071727374757677"
   29938             : };
   29939             : static const char DIGITS_HEX[2*16+1] = {
   29940             :     "0123456789abcdef"
   29941             :     "0123456789ABCDEF"
   29942             : };
   29943             : 
   29944             : /* BuildPyUnicode */
   29945           0 : static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
   29946             :                                                 int prepend_sign, char padding_char) {
   29947           0 :     PyObject *uval;
   29948           0 :     Py_ssize_t uoffset = ulength - clength;
   29949             : #if CYTHON_USE_UNICODE_INTERNALS
   29950           0 :     Py_ssize_t i;
   29951             : #if CYTHON_PEP393_ENABLED
   29952           0 :     void *udata;
   29953           0 :     uval = PyUnicode_New(ulength, 127);
   29954           0 :     if (unlikely(!uval)) return NULL;
   29955           0 :     udata = PyUnicode_DATA(uval);
   29956             : #else
   29957             :     Py_UNICODE *udata;
   29958             :     uval = PyUnicode_FromUnicode(NULL, ulength);
   29959             :     if (unlikely(!uval)) return NULL;
   29960             :     udata = PyUnicode_AS_UNICODE(uval);
   29961             : #endif
   29962           0 :     if (uoffset > 0) {
   29963           0 :         i = 0;
   29964           0 :         if (prepend_sign) {
   29965           0 :             __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
   29966           0 :             i++;
   29967             :         }
   29968           0 :         for (; i < uoffset; i++) {
   29969           0 :             __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
   29970             :         }
   29971             :     }
   29972           0 :     for (i=0; i < clength; i++) {
   29973           0 :         __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
   29974             :     }
   29975             : #else
   29976             :     {
   29977             :         PyObject *sign = NULL, *padding = NULL;
   29978             :         uval = NULL;
   29979             :         if (uoffset > 0) {
   29980             :             prepend_sign = !!prepend_sign;
   29981             :             if (uoffset > prepend_sign) {
   29982             :                 padding = PyUnicode_FromOrdinal(padding_char);
   29983             :                 if (likely(padding) && uoffset > prepend_sign + 1) {
   29984             :                     PyObject *tmp;
   29985             :                     PyObject *repeat = PyInt_FromSsize_t(uoffset - prepend_sign);
   29986             :                     if (unlikely(!repeat)) goto done_or_error;
   29987             :                     tmp = PyNumber_Multiply(padding, repeat);
   29988             :                     Py_DECREF(repeat);
   29989             :                     Py_DECREF(padding);
   29990             :                     padding = tmp;
   29991             :                 }
   29992             :                 if (unlikely(!padding)) goto done_or_error;
   29993             :             }
   29994             :             if (prepend_sign) {
   29995             :                 sign = PyUnicode_FromOrdinal('-');
   29996             :                 if (unlikely(!sign)) goto done_or_error;
   29997             :             }
   29998             :         }
   29999             :         uval = PyUnicode_DecodeASCII(chars, clength, NULL);
   30000             :         if (likely(uval) && padding) {
   30001             :             PyObject *tmp = PyNumber_Add(padding, uval);
   30002             :             Py_DECREF(uval);
   30003             :             uval = tmp;
   30004             :         }
   30005             :         if (likely(uval) && sign) {
   30006             :             PyObject *tmp = PyNumber_Add(sign, uval);
   30007             :             Py_DECREF(uval);
   30008             :             uval = tmp;
   30009             :         }
   30010             : done_or_error:
   30011             :         Py_XDECREF(padding);
   30012             :         Py_XDECREF(sign);
   30013             :     }
   30014             : #endif
   30015             :     return uval;
   30016             : }
   30017             : 
   30018             : /* CIntToPyUnicode */
   30019           0 : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) {
   30020           0 :     char digits[sizeof(int)*3+2];
   30021           0 :     char *dpos, *end = digits + sizeof(int)*3+2;
   30022           0 :     const char *hex_digits = DIGITS_HEX;
   30023           0 :     Py_ssize_t length, ulength;
   30024           0 :     int prepend_sign, last_one_off;
   30025           0 :     int remaining;
   30026             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   30027             : #pragma GCC diagnostic push
   30028             : #pragma GCC diagnostic ignored "-Wconversion"
   30029             : #endif
   30030           0 :     const int neg_one = (int) -1, const_zero = (int) 0;
   30031             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   30032             : #pragma GCC diagnostic pop
   30033             : #endif
   30034           0 :     const int is_unsigned = neg_one > const_zero;
   30035           0 :     if (format_char == 'X') {
   30036           0 :         hex_digits += 16;
   30037           0 :         format_char = 'x';
   30038             :     }
   30039           0 :     remaining = value;
   30040           0 :     last_one_off = 0;
   30041           0 :     dpos = end;
   30042           0 :     do {
   30043           0 :         int digit_pos;
   30044           0 :         switch (format_char) {
   30045           0 :         case 'o':
   30046           0 :             digit_pos = abs((int)(remaining % (8*8)));
   30047           0 :             remaining = (int) (remaining / (8*8));
   30048           0 :             dpos -= 2;
   30049           0 :             memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
   30050           0 :             last_one_off = (digit_pos < 8);
   30051           0 :             break;
   30052           0 :         case 'd':
   30053           0 :             digit_pos = abs((int)(remaining % (10*10)));
   30054           0 :             remaining = (int) (remaining / (10*10));
   30055           0 :             dpos -= 2;
   30056           0 :             memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
   30057           0 :             last_one_off = (digit_pos < 10);
   30058           0 :             break;
   30059           0 :         case 'x':
   30060           0 :             *(--dpos) = hex_digits[abs((int)(remaining % 16))];
   30061           0 :             remaining = (int) (remaining / 16);
   30062           0 :             break;
   30063             :         default:
   30064             :             assert(0);
   30065             :             break;
   30066             :         }
   30067           0 :     } while (unlikely(remaining != 0));
   30068           0 :     assert(!last_one_off || *dpos == '0');
   30069           0 :     dpos += last_one_off;
   30070           0 :     length = end - dpos;
   30071           0 :     ulength = length;
   30072           0 :     prepend_sign = 0;
   30073           0 :     if (!is_unsigned && value <= neg_one) {
   30074           0 :         if (padding_char == ' ' || width <= length + 1) {
   30075           0 :             *(--dpos) = '-';
   30076           0 :             ++length;
   30077             :         } else {
   30078             :             prepend_sign = 1;
   30079             :         }
   30080           0 :         ++ulength;
   30081             :     }
   30082           0 :     if (width > ulength) {
   30083             :         ulength = width;
   30084             :     }
   30085           0 :     if (ulength == 1) {
   30086           0 :         return PyUnicode_FromOrdinal(*dpos);
   30087             :     }
   30088           0 :     return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
   30089             : }
   30090             : 
   30091             : /* CIntToPyUnicode */
   30092           0 : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
   30093           0 :     char digits[sizeof(Py_ssize_t)*3+2];
   30094           0 :     char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
   30095           0 :     const char *hex_digits = DIGITS_HEX;
   30096           0 :     Py_ssize_t length, ulength;
   30097           0 :     int prepend_sign, last_one_off;
   30098           0 :     Py_ssize_t remaining;
   30099             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   30100             : #pragma GCC diagnostic push
   30101             : #pragma GCC diagnostic ignored "-Wconversion"
   30102             : #endif
   30103           0 :     const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
   30104             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   30105             : #pragma GCC diagnostic pop
   30106             : #endif
   30107           0 :     const int is_unsigned = neg_one > const_zero;
   30108           0 :     if (format_char == 'X') {
   30109           0 :         hex_digits += 16;
   30110           0 :         format_char = 'x';
   30111             :     }
   30112           0 :     remaining = value;
   30113           0 :     last_one_off = 0;
   30114           0 :     dpos = end;
   30115           0 :     do {
   30116           0 :         int digit_pos;
   30117           0 :         switch (format_char) {
   30118           0 :         case 'o':
   30119           0 :             digit_pos = abs((int)(remaining % (8*8)));
   30120           0 :             remaining = (Py_ssize_t) (remaining / (8*8));
   30121           0 :             dpos -= 2;
   30122           0 :             memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
   30123           0 :             last_one_off = (digit_pos < 8);
   30124           0 :             break;
   30125           0 :         case 'd':
   30126           0 :             digit_pos = abs((int)(remaining % (10*10)));
   30127           0 :             remaining = (Py_ssize_t) (remaining / (10*10));
   30128           0 :             dpos -= 2;
   30129           0 :             memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
   30130           0 :             last_one_off = (digit_pos < 10);
   30131           0 :             break;
   30132           0 :         case 'x':
   30133           0 :             *(--dpos) = hex_digits[abs((int)(remaining % 16))];
   30134           0 :             remaining = (Py_ssize_t) (remaining / 16);
   30135           0 :             break;
   30136             :         default:
   30137             :             assert(0);
   30138             :             break;
   30139             :         }
   30140           0 :     } while (unlikely(remaining != 0));
   30141           0 :     assert(!last_one_off || *dpos == '0');
   30142           0 :     dpos += last_one_off;
   30143           0 :     length = end - dpos;
   30144           0 :     ulength = length;
   30145           0 :     prepend_sign = 0;
   30146           0 :     if (!is_unsigned && value <= neg_one) {
   30147           0 :         if (padding_char == ' ' || width <= length + 1) {
   30148           0 :             *(--dpos) = '-';
   30149           0 :             ++length;
   30150             :         } else {
   30151             :             prepend_sign = 1;
   30152             :         }
   30153           0 :         ++ulength;
   30154             :     }
   30155           0 :     if (width > ulength) {
   30156             :         ulength = width;
   30157             :     }
   30158           0 :     if (ulength == 1) {
   30159           0 :         return PyUnicode_FromOrdinal(*dpos);
   30160             :     }
   30161           0 :     return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
   30162             : }
   30163             : 
   30164             : /* JoinPyUnicode */
   30165           0 : static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
   30166             :                                       Py_UCS4 max_char) {
   30167             : #if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   30168           0 :     PyObject *result_uval;
   30169           0 :     int result_ukind, kind_shift;
   30170           0 :     Py_ssize_t i, char_pos;
   30171           0 :     void *result_udata;
   30172           0 :     CYTHON_MAYBE_UNUSED_VAR(max_char);
   30173             : #if CYTHON_PEP393_ENABLED
   30174           0 :     result_uval = PyUnicode_New(result_ulength, max_char);
   30175           0 :     if (unlikely(!result_uval)) return NULL;
   30176           0 :     result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
   30177           0 :     kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
   30178           0 :     result_udata = PyUnicode_DATA(result_uval);
   30179             : #else
   30180             :     result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
   30181             :     if (unlikely(!result_uval)) return NULL;
   30182             :     result_ukind = sizeof(Py_UNICODE);
   30183             :     kind_shift = (result_ukind == 4) ? 2 : result_ukind - 1;
   30184             :     result_udata = PyUnicode_AS_UNICODE(result_uval);
   30185             : #endif
   30186           0 :     assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
   30187           0 :     char_pos = 0;
   30188           0 :     for (i=0; i < value_count; i++) {
   30189           0 :         int ukind;
   30190           0 :         Py_ssize_t ulength;
   30191           0 :         void *udata;
   30192           0 :         PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
   30193           0 :         if (unlikely(__Pyx_PyUnicode_READY(uval)))
   30194             :             goto bad;
   30195           0 :         ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
   30196           0 :         if (unlikely(!ulength))
   30197           0 :             continue;
   30198           0 :         if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
   30199           0 :             goto overflow;
   30200           0 :         ukind = __Pyx_PyUnicode_KIND(uval);
   30201           0 :         udata = __Pyx_PyUnicode_DATA(uval);
   30202           0 :         if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
   30203           0 :             memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
   30204             :         } else {
   30205             :             #if PY_VERSION_HEX >= 0x030d0000
   30206             :             if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
   30207             :             #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
   30208           0 :             _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
   30209             :             #else
   30210             :             Py_ssize_t j;
   30211             :             for (j=0; j < ulength; j++) {
   30212             :                 Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
   30213             :                 __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
   30214             :             }
   30215             :             #endif
   30216             :         }
   30217           0 :         char_pos += ulength;
   30218             :     }
   30219             :     return result_uval;
   30220           0 : overflow:
   30221           0 :     PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
   30222           0 : bad:
   30223           0 :     Py_DECREF(result_uval);
   30224             :     return NULL;
   30225             : #else
   30226             :     CYTHON_UNUSED_VAR(max_char);
   30227             :     CYTHON_UNUSED_VAR(result_ulength);
   30228             :     CYTHON_UNUSED_VAR(value_count);
   30229             :     return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
   30230             : #endif
   30231             : }
   30232             : 
   30233             : /* GetAttr */
   30234           0 : static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
   30235             : #if CYTHON_USE_TYPE_SLOTS
   30236             : #if PY_MAJOR_VERSION >= 3
   30237           0 :     if (likely(PyUnicode_Check(n)))
   30238             : #else
   30239             :     if (likely(PyString_Check(n)))
   30240             : #endif
   30241           0 :         return __Pyx_PyObject_GetAttrStr(o, n);
   30242             : #endif
   30243           0 :     return PyObject_GetAttr(o, n);
   30244             : }
   30245             : 
   30246             : /* GetItemInt */
   30247           0 : static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
   30248           0 :     PyObject *r;
   30249           0 :     if (unlikely(!j)) return NULL;
   30250           0 :     r = PyObject_GetItem(o, j);
   30251           0 :     Py_DECREF(j);
   30252             :     return r;
   30253             : }
   30254             : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
   30255             :                                                               CYTHON_NCP_UNUSED int wraparound,
   30256             :                                                               CYTHON_NCP_UNUSED int boundscheck) {
   30257             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   30258             :     Py_ssize_t wrapped_i = i;
   30259             :     if (wraparound & unlikely(i < 0)) {
   30260             :         wrapped_i += PyList_GET_SIZE(o);
   30261             :     }
   30262             :     if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
   30263             :         PyObject *r = PyList_GET_ITEM(o, wrapped_i);
   30264             :         Py_INCREF(r);
   30265             :         return r;
   30266             :     }
   30267             :     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
   30268             : #else
   30269             :     return PySequence_GetItem(o, i);
   30270             : #endif
   30271             : }
   30272           0 : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
   30273             :                                                               CYTHON_NCP_UNUSED int wraparound,
   30274             :                                                               CYTHON_NCP_UNUSED int boundscheck) {
   30275             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   30276           0 :     Py_ssize_t wrapped_i = i;
   30277           0 :     if (wraparound & unlikely(i < 0)) {
   30278           0 :         wrapped_i += PyTuple_GET_SIZE(o);
   30279             :     }
   30280           0 :     if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
   30281           0 :         PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
   30282           0 :         Py_INCREF(r);
   30283           0 :         return r;
   30284             :     }
   30285           0 :     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
   30286             : #else
   30287             :     return PySequence_GetItem(o, i);
   30288             : #endif
   30289             : }
   30290           0 : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
   30291             :                                                      CYTHON_NCP_UNUSED int wraparound,
   30292             :                                                      CYTHON_NCP_UNUSED int boundscheck) {
   30293             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
   30294           0 :     if (is_list || PyList_CheckExact(o)) {
   30295           0 :         Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
   30296           0 :         if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
   30297           0 :             PyObject *r = PyList_GET_ITEM(o, n);
   30298           0 :             Py_INCREF(r);
   30299           0 :             return r;
   30300             :         }
   30301             :     }
   30302           0 :     else if (PyTuple_CheckExact(o)) {
   30303           0 :         Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
   30304           0 :         if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
   30305           0 :             PyObject *r = PyTuple_GET_ITEM(o, n);
   30306           0 :             Py_INCREF(r);
   30307           0 :             return r;
   30308             :         }
   30309             :     } else {
   30310           0 :         PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
   30311           0 :         PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
   30312           0 :         if (mm && mm->mp_subscript) {
   30313           0 :             PyObject *r, *key = PyInt_FromSsize_t(i);
   30314           0 :             if (unlikely(!key)) return NULL;
   30315           0 :             r = mm->mp_subscript(o, key);
   30316           0 :             Py_DECREF(key);
   30317           0 :             return r;
   30318             :         }
   30319           0 :         if (likely(sm && sm->sq_item)) {
   30320           0 :             if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
   30321           0 :                 Py_ssize_t l = sm->sq_length(o);
   30322           0 :                 if (likely(l >= 0)) {
   30323           0 :                     i += l;
   30324             :                 } else {
   30325           0 :                     if (!PyErr_ExceptionMatches(PyExc_OverflowError))
   30326             :                         return NULL;
   30327           0 :                     PyErr_Clear();
   30328             :                 }
   30329             :             }
   30330           0 :             return sm->sq_item(o, i);
   30331             :         }
   30332             :     }
   30333             : #else
   30334             :     if (is_list || !PyMapping_Check(o)) {
   30335             :         return PySequence_GetItem(o, i);
   30336             :     }
   30337             : #endif
   30338           0 :     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
   30339             : }
   30340             : 
   30341             : /* PyObjectCallOneArg */
   30342           6 : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
   30343           6 :     PyObject *args[2] = {NULL, arg};
   30344           6 :     return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
   30345             : }
   30346             : 
   30347             : /* ObjectGetItem */
   30348             : #if CYTHON_USE_TYPE_SLOTS
   30349           0 : static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
   30350           0 :     PyObject *runerr = NULL;
   30351           0 :     Py_ssize_t key_value;
   30352           0 :     key_value = __Pyx_PyIndex_AsSsize_t(index);
   30353           0 :     if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
   30354           0 :         return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
   30355             :     }
   30356           0 :     if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
   30357           0 :         __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index));
   30358           0 :         PyErr_Clear();
   30359           0 :         PyErr_Format(PyExc_IndexError,
   30360             :             "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
   30361             :         __Pyx_DECREF_TypeName(index_type_name);
   30362             :     }
   30363             :     return NULL;
   30364             : }
   30365           0 : static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
   30366           0 :     __Pyx_TypeName obj_type_name;
   30367           0 :     if (likely(PyType_Check(obj))) {
   30368           0 :         PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem);
   30369           0 :         if (!meth) {
   30370           0 :             PyErr_Clear();
   30371             :         } else {
   30372           0 :             PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
   30373           0 :             Py_DECREF(meth);
   30374           0 :             return result;
   30375             :         }
   30376             :     }
   30377           0 :     obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   30378           0 :     PyErr_Format(PyExc_TypeError,
   30379             :         "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
   30380           0 :     __Pyx_DECREF_TypeName(obj_type_name);
   30381           0 :     return NULL;
   30382             : }
   30383           2 : static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
   30384           2 :     PyTypeObject *tp = Py_TYPE(obj);
   30385           2 :     PyMappingMethods *mm = tp->tp_as_mapping;
   30386           2 :     PySequenceMethods *sm = tp->tp_as_sequence;
   30387           2 :     if (likely(mm && mm->mp_subscript)) {
   30388           2 :         return mm->mp_subscript(obj, key);
   30389             :     }
   30390           0 :     if (likely(sm && sm->sq_item)) {
   30391           0 :         return __Pyx_PyObject_GetIndex(obj, key);
   30392             :     }
   30393           0 :     return __Pyx_PyObject_GetItem_Slow(obj, key);
   30394             : }
   30395             : #endif
   30396             : 
   30397             : /* KeywordStringCheck */
   30398           0 : static int __Pyx_CheckKeywordStrings(
   30399             :     PyObject *kw,
   30400             :     const char* function_name,
   30401             :     int kw_allowed)
   30402             : {
   30403           0 :     PyObject* key = 0;
   30404           0 :     Py_ssize_t pos = 0;
   30405             : #if CYTHON_COMPILING_IN_PYPY
   30406             :     if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0))
   30407             :         goto invalid_keyword;
   30408             :     return 1;
   30409             : #else
   30410           0 :     if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
   30411           0 :         Py_ssize_t kwsize;
   30412             : #if CYTHON_ASSUME_SAFE_MACROS
   30413           0 :         kwsize = PyTuple_GET_SIZE(kw);
   30414             : #else
   30415             :         kwsize = PyTuple_Size(kw);
   30416             :         if (kwsize < 0) return 0;
   30417             : #endif
   30418           0 :         if (unlikely(kwsize == 0))
   30419             :             return 1;
   30420           0 :         if (!kw_allowed) {
   30421             : #if CYTHON_ASSUME_SAFE_MACROS
   30422           0 :             key = PyTuple_GET_ITEM(kw, 0);
   30423             : #else
   30424             :             key = PyTuple_GetItem(kw, pos);
   30425             :             if (!key) return 0;
   30426             : #endif
   30427           0 :             goto invalid_keyword;
   30428             :         }
   30429             : #if PY_VERSION_HEX < 0x03090000
   30430             :         for (pos = 0; pos < kwsize; pos++) {
   30431             : #if CYTHON_ASSUME_SAFE_MACROS
   30432             :             key = PyTuple_GET_ITEM(kw, pos);
   30433             : #else
   30434             :             key = PyTuple_GetItem(kw, pos);
   30435             :             if (!key) return 0;
   30436             : #endif
   30437             :             if (unlikely(!PyUnicode_Check(key)))
   30438             :                 goto invalid_keyword_type;
   30439             :         }
   30440             : #endif
   30441             :         return 1;
   30442             :     }
   30443           0 :     while (PyDict_Next(kw, &pos, &key, 0)) {
   30444             :         #if PY_MAJOR_VERSION < 3
   30445             :         if (unlikely(!PyString_Check(key)))
   30446             :         #endif
   30447           0 :             if (unlikely(!PyUnicode_Check(key)))
   30448           0 :                 goto invalid_keyword_type;
   30449             :     }
   30450           0 :     if (!kw_allowed && unlikely(key))
   30451           0 :         goto invalid_keyword;
   30452             :     return 1;
   30453           0 : invalid_keyword_type:
   30454           0 :     PyErr_Format(PyExc_TypeError,
   30455             :         "%.200s() keywords must be strings", function_name);
   30456           0 :     return 0;
   30457             : #endif
   30458           0 : invalid_keyword:
   30459             :     #if PY_MAJOR_VERSION < 3
   30460             :     PyErr_Format(PyExc_TypeError,
   30461             :         "%.200s() got an unexpected keyword argument '%.200s'",
   30462             :         function_name, PyString_AsString(key));
   30463             :     #else
   30464           0 :     PyErr_Format(PyExc_TypeError,
   30465             :         "%s() got an unexpected keyword argument '%U'",
   30466             :         function_name, key);
   30467             :     #endif
   30468           0 :     return 0;
   30469             : }
   30470             : 
   30471             : /* DivInt[Py_ssize_t] */
   30472           0 : static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
   30473           0 :     Py_ssize_t q = a / b;
   30474           0 :     Py_ssize_t r = a - q*b;
   30475           0 :     q -= ((r != 0) & ((r ^ b) < 0));
   30476           0 :     return q;
   30477             : }
   30478             : 
   30479             : /* GetAttr3 */
   30480             : #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
   30481           0 : static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
   30482           0 :     __Pyx_PyThreadState_declare
   30483           0 :     __Pyx_PyThreadState_assign
   30484           0 :     if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
   30485             :         return NULL;
   30486           0 :     __Pyx_PyErr_Clear();
   30487           0 :     Py_INCREF(d);
   30488             :     return d;
   30489             : }
   30490             : #endif
   30491           0 : static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
   30492           0 :     PyObject *r;
   30493             : #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
   30494             :     int res = PyObject_GetOptionalAttr(o, n, &r);
   30495             :     return (res != 0) ? r : __Pyx_NewRef(d);
   30496             : #else
   30497             :   #if CYTHON_USE_TYPE_SLOTS
   30498           0 :     if (likely(PyString_Check(n))) {
   30499           0 :         r = __Pyx_PyObject_GetAttrStrNoError(o, n);
   30500           0 :         if (unlikely(!r) && likely(!PyErr_Occurred())) {
   30501           0 :             r = __Pyx_NewRef(d);
   30502             :         }
   30503           0 :         return r;
   30504             :     }
   30505             :   #endif
   30506           0 :     r = PyObject_GetAttr(o, n);
   30507           0 :     return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
   30508             : #endif
   30509             : }
   30510             : 
   30511             : /* PyDictVersioning */
   30512             : #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
   30513             : static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
   30514             :     PyObject *dict = Py_TYPE(obj)->tp_dict;
   30515             :     return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
   30516             : }
   30517             : static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
   30518             :     PyObject **dictptr = NULL;
   30519             :     Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
   30520             :     if (offset) {
   30521             : #if CYTHON_COMPILING_IN_CPYTHON
   30522             :         dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
   30523             : #else
   30524             :         dictptr = _PyObject_GetDictPtr(obj);
   30525             : #endif
   30526             :     }
   30527             :     return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
   30528             : }
   30529             : static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
   30530             :     PyObject *dict = Py_TYPE(obj)->tp_dict;
   30531             :     if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
   30532             :         return 0;
   30533             :     return obj_dict_version == __Pyx_get_object_dict_version(obj);
   30534             : }
   30535             : #endif
   30536             : 
   30537             : /* GetModuleGlobalName */
   30538             : #if CYTHON_USE_DICT_VERSIONS
   30539             : static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
   30540             : #else
   30541        4649 : static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
   30542             : #endif
   30543             : {
   30544        4649 :     PyObject *result;
   30545             : #if !CYTHON_AVOID_BORROWED_REFS
   30546             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
   30547        4649 :     result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
   30548             :     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
   30549        4649 :     if (likely(result)) {
   30550        9298 :         return __Pyx_NewRef(result);
   30551           0 :     } else if (unlikely(PyErr_Occurred())) {
   30552             :         return NULL;
   30553             :     }
   30554             : #elif CYTHON_COMPILING_IN_LIMITED_API
   30555             :     if (unlikely(!__pyx_m)) {
   30556             :         return NULL;
   30557             :     }
   30558             :     result = PyObject_GetAttr(__pyx_m, name);
   30559             :     if (likely(result)) {
   30560             :         return result;
   30561             :     }
   30562             : #else
   30563             :     result = PyDict_GetItem(__pyx_d, name);
   30564             :     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
   30565             :     if (likely(result)) {
   30566             :         return __Pyx_NewRef(result);
   30567             :     }
   30568             : #endif
   30569             : #else
   30570             :     result = PyObject_GetItem(__pyx_d, name);
   30571             :     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
   30572             :     if (likely(result)) {
   30573             :         return __Pyx_NewRef(result);
   30574             :     }
   30575             :     PyErr_Clear();
   30576             : #endif
   30577           0 :     return __Pyx_GetBuiltinName(name);
   30578             : }
   30579             : 
   30580             : /* RaiseTooManyValuesToUnpack */
   30581           0 : static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
   30582           0 :     PyErr_Format(PyExc_ValueError,
   30583             :                  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
   30584           0 : }
   30585             : 
   30586             : /* RaiseNeedMoreValuesToUnpack */
   30587           0 : static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
   30588           0 :     PyErr_Format(PyExc_ValueError,
   30589             :                  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
   30590             :                  index, (index == 1) ? "" : "s");
   30591           0 : }
   30592             : 
   30593             : /* RaiseNoneIterError */
   30594           0 : static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
   30595           0 :     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
   30596             : }
   30597             : 
   30598             : /* ExtTypeTest */
   30599           0 : static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
   30600           0 :     __Pyx_TypeName obj_type_name;
   30601           0 :     __Pyx_TypeName type_name;
   30602           0 :     if (unlikely(!type)) {
   30603           0 :         PyErr_SetString(PyExc_SystemError, "Missing type object");
   30604           0 :         return 0;
   30605             :     }
   30606           0 :     if (likely(__Pyx_TypeCheck(obj, type)))
   30607             :         return 1;
   30608           0 :     obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   30609           0 :     type_name = __Pyx_PyType_GetName(type);
   30610           0 :     PyErr_Format(PyExc_TypeError,
   30611             :                  "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
   30612             :                  obj_type_name, type_name);
   30613           0 :     __Pyx_DECREF_TypeName(obj_type_name);
   30614           0 :     __Pyx_DECREF_TypeName(type_name);
   30615           0 :     return 0;
   30616             : }
   30617             : 
   30618             : /* GetTopmostException */
   30619             : #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
   30620             : static _PyErr_StackItem *
   30621          15 : __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
   30622             : {
   30623          15 :     _PyErr_StackItem *exc_info = tstate->exc_info;
   30624          70 :     while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
   30625          70 :            exc_info->previous_item != NULL)
   30626             :     {
   30627             :         exc_info = exc_info->previous_item;
   30628             :     }
   30629          15 :     return exc_info;
   30630             : }
   30631             : #endif
   30632             : 
   30633             : /* SaveResetException */
   30634             : #if CYTHON_FAST_THREAD_STATE
   30635          15 : static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
   30636             :   #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
   30637          15 :     _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
   30638          15 :     PyObject *exc_value = exc_info->exc_value;
   30639          15 :     if (exc_value == NULL || exc_value == Py_None) {
   30640          15 :         *value = NULL;
   30641          15 :         *type = NULL;
   30642          15 :         *tb = NULL;
   30643             :     } else {
   30644           0 :         *value = exc_value;
   30645           0 :         Py_INCREF(*value);
   30646           0 :         *type = (PyObject*) Py_TYPE(exc_value);
   30647           0 :         Py_INCREF(*type);
   30648           0 :         *tb = PyException_GetTraceback(exc_value);
   30649             :     }
   30650             :   #elif CYTHON_USE_EXC_INFO_STACK
   30651             :     _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
   30652             :     *type = exc_info->exc_type;
   30653             :     *value = exc_info->exc_value;
   30654             :     *tb = exc_info->exc_traceback;
   30655             :     Py_XINCREF(*type);
   30656             :     Py_XINCREF(*value);
   30657             :     Py_XINCREF(*tb);
   30658             :   #else
   30659             :     *type = tstate->exc_type;
   30660             :     *value = tstate->exc_value;
   30661             :     *tb = tstate->exc_traceback;
   30662             :     Py_XINCREF(*type);
   30663             :     Py_XINCREF(*value);
   30664             :     Py_XINCREF(*tb);
   30665             :   #endif
   30666          15 : }
   30667           0 : static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
   30668             :   #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
   30669           0 :     _PyErr_StackItem *exc_info = tstate->exc_info;
   30670           0 :     PyObject *tmp_value = exc_info->exc_value;
   30671           0 :     exc_info->exc_value = value;
   30672           0 :     Py_XDECREF(tmp_value);
   30673           0 :     Py_XDECREF(type);
   30674           0 :     Py_XDECREF(tb);
   30675             :   #else
   30676             :     PyObject *tmp_type, *tmp_value, *tmp_tb;
   30677             :     #if CYTHON_USE_EXC_INFO_STACK
   30678             :     _PyErr_StackItem *exc_info = tstate->exc_info;
   30679             :     tmp_type = exc_info->exc_type;
   30680             :     tmp_value = exc_info->exc_value;
   30681             :     tmp_tb = exc_info->exc_traceback;
   30682             :     exc_info->exc_type = type;
   30683             :     exc_info->exc_value = value;
   30684             :     exc_info->exc_traceback = tb;
   30685             :     #else
   30686             :     tmp_type = tstate->exc_type;
   30687             :     tmp_value = tstate->exc_value;
   30688             :     tmp_tb = tstate->exc_traceback;
   30689             :     tstate->exc_type = type;
   30690             :     tstate->exc_value = value;
   30691             :     tstate->exc_traceback = tb;
   30692             :     #endif
   30693             :     Py_XDECREF(tmp_type);
   30694             :     Py_XDECREF(tmp_value);
   30695             :     Py_XDECREF(tmp_tb);
   30696             :   #endif
   30697           0 : }
   30698             : #endif
   30699             : 
   30700             : /* GetException */
   30701             : #if CYTHON_FAST_THREAD_STATE
   30702           0 : static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
   30703             : #else
   30704             : static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
   30705             : #endif
   30706             : {
   30707           0 :     PyObject *local_type = NULL, *local_value, *local_tb = NULL;
   30708             : #if CYTHON_FAST_THREAD_STATE
   30709           0 :     PyObject *tmp_type, *tmp_value, *tmp_tb;
   30710             :   #if PY_VERSION_HEX >= 0x030C00A6
   30711           0 :     local_value = tstate->current_exception;
   30712           0 :     tstate->current_exception = 0;
   30713           0 :     if (likely(local_value)) {
   30714           0 :         local_type = (PyObject*) Py_TYPE(local_value);
   30715           0 :         Py_INCREF(local_type);
   30716           0 :         local_tb = PyException_GetTraceback(local_value);
   30717             :     }
   30718             :   #else
   30719             :     local_type = tstate->curexc_type;
   30720             :     local_value = tstate->curexc_value;
   30721             :     local_tb = tstate->curexc_traceback;
   30722             :     tstate->curexc_type = 0;
   30723             :     tstate->curexc_value = 0;
   30724             :     tstate->curexc_traceback = 0;
   30725             :   #endif
   30726             : #else
   30727             :     PyErr_Fetch(&local_type, &local_value, &local_tb);
   30728             : #endif
   30729           0 :     PyErr_NormalizeException(&local_type, &local_value, &local_tb);
   30730             : #if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6
   30731           0 :     if (unlikely(tstate->current_exception))
   30732             : #elif CYTHON_FAST_THREAD_STATE
   30733             :     if (unlikely(tstate->curexc_type))
   30734             : #else
   30735             :     if (unlikely(PyErr_Occurred()))
   30736             : #endif
   30737           0 :         goto bad;
   30738             :     #if PY_MAJOR_VERSION >= 3
   30739           0 :     if (local_tb) {
   30740           0 :         if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
   30741           0 :             goto bad;
   30742             :     }
   30743             :     #endif
   30744           0 :     Py_XINCREF(local_tb);
   30745           0 :     Py_XINCREF(local_type);
   30746           0 :     Py_XINCREF(local_value);
   30747           0 :     *type = local_type;
   30748           0 :     *value = local_value;
   30749           0 :     *tb = local_tb;
   30750             : #if CYTHON_FAST_THREAD_STATE
   30751             :     #if CYTHON_USE_EXC_INFO_STACK
   30752             :     {
   30753           0 :         _PyErr_StackItem *exc_info = tstate->exc_info;
   30754             :       #if PY_VERSION_HEX >= 0x030B00a4
   30755           0 :         tmp_value = exc_info->exc_value;
   30756           0 :         exc_info->exc_value = local_value;
   30757           0 :         tmp_type = NULL;
   30758           0 :         tmp_tb = NULL;
   30759           0 :         Py_XDECREF(local_type);
   30760           0 :         Py_XDECREF(local_tb);
   30761             :       #else
   30762             :         tmp_type = exc_info->exc_type;
   30763             :         tmp_value = exc_info->exc_value;
   30764             :         tmp_tb = exc_info->exc_traceback;
   30765             :         exc_info->exc_type = local_type;
   30766             :         exc_info->exc_value = local_value;
   30767             :         exc_info->exc_traceback = local_tb;
   30768             :       #endif
   30769             :     }
   30770             :     #else
   30771             :     tmp_type = tstate->exc_type;
   30772             :     tmp_value = tstate->exc_value;
   30773             :     tmp_tb = tstate->exc_traceback;
   30774             :     tstate->exc_type = local_type;
   30775             :     tstate->exc_value = local_value;
   30776             :     tstate->exc_traceback = local_tb;
   30777             :     #endif
   30778           0 :     Py_XDECREF(tmp_type);
   30779           0 :     Py_XDECREF(tmp_value);
   30780           0 :     Py_XDECREF(tmp_tb);
   30781             : #else
   30782             :     PyErr_SetExcInfo(local_type, local_value, local_tb);
   30783             : #endif
   30784           0 :     return 0;
   30785           0 : bad:
   30786           0 :     *type = 0;
   30787           0 :     *value = 0;
   30788           0 :     *tb = 0;
   30789           0 :     Py_XDECREF(local_type);
   30790           0 :     Py_XDECREF(local_value);
   30791           0 :     Py_XDECREF(local_tb);
   30792           0 :     return -1;
   30793             : }
   30794             : 
   30795             : /* SwapException */
   30796             : #if CYTHON_FAST_THREAD_STATE
   30797           0 : static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
   30798           0 :     PyObject *tmp_type, *tmp_value, *tmp_tb;
   30799             :   #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
   30800           0 :     _PyErr_StackItem *exc_info = tstate->exc_info;
   30801           0 :     tmp_value = exc_info->exc_value;
   30802           0 :     exc_info->exc_value = *value;
   30803           0 :     if (tmp_value == NULL || tmp_value == Py_None) {
   30804           0 :         Py_XDECREF(tmp_value);
   30805           0 :         tmp_value = NULL;
   30806           0 :         tmp_type = NULL;
   30807           0 :         tmp_tb = NULL;
   30808             :     } else {
   30809           0 :         tmp_type = (PyObject*) Py_TYPE(tmp_value);
   30810           0 :         Py_INCREF(tmp_type);
   30811             :         #if CYTHON_COMPILING_IN_CPYTHON
   30812           0 :         tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
   30813           0 :         Py_XINCREF(tmp_tb);
   30814             :         #else
   30815             :         tmp_tb = PyException_GetTraceback(tmp_value);
   30816             :         #endif
   30817             :     }
   30818             :   #elif CYTHON_USE_EXC_INFO_STACK
   30819             :     _PyErr_StackItem *exc_info = tstate->exc_info;
   30820             :     tmp_type = exc_info->exc_type;
   30821             :     tmp_value = exc_info->exc_value;
   30822             :     tmp_tb = exc_info->exc_traceback;
   30823             :     exc_info->exc_type = *type;
   30824             :     exc_info->exc_value = *value;
   30825             :     exc_info->exc_traceback = *tb;
   30826             :   #else
   30827             :     tmp_type = tstate->exc_type;
   30828             :     tmp_value = tstate->exc_value;
   30829             :     tmp_tb = tstate->exc_traceback;
   30830             :     tstate->exc_type = *type;
   30831             :     tstate->exc_value = *value;
   30832             :     tstate->exc_traceback = *tb;
   30833             :   #endif
   30834           0 :     *type = tmp_type;
   30835           0 :     *value = tmp_value;
   30836           0 :     *tb = tmp_tb;
   30837           0 : }
   30838             : #else
   30839             : static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
   30840             :     PyObject *tmp_type, *tmp_value, *tmp_tb;
   30841             :     PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
   30842             :     PyErr_SetExcInfo(*type, *value, *tb);
   30843             :     *type = tmp_type;
   30844             :     *value = tmp_value;
   30845             :     *tb = tmp_tb;
   30846             : }
   30847             : #endif
   30848             : 
   30849             : /* Import */
   30850           9 : static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
   30851           9 :     PyObject *module = 0;
   30852           9 :     PyObject *empty_dict = 0;
   30853           9 :     PyObject *empty_list = 0;
   30854             :     #if PY_MAJOR_VERSION < 3
   30855             :     PyObject *py_import;
   30856             :     py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
   30857             :     if (unlikely(!py_import))
   30858             :         goto bad;
   30859             :     if (!from_list) {
   30860             :         empty_list = PyList_New(0);
   30861             :         if (unlikely(!empty_list))
   30862             :             goto bad;
   30863             :         from_list = empty_list;
   30864             :     }
   30865             :     #endif
   30866           9 :     empty_dict = PyDict_New();
   30867           9 :     if (unlikely(!empty_dict))
   30868           0 :         goto bad;
   30869             :     {
   30870             :         #if PY_MAJOR_VERSION >= 3
   30871           9 :         if (level == -1) {
   30872           0 :             if (strchr(__Pyx_MODULE_NAME, '.') != NULL) {
   30873           0 :                 module = PyImport_ImportModuleLevelObject(
   30874           0 :                     name, __pyx_d, empty_dict, from_list, 1);
   30875           0 :                 if (unlikely(!module)) {
   30876           0 :                     if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
   30877           0 :                         goto bad;
   30878           0 :                     PyErr_Clear();
   30879             :                 }
   30880             :             }
   30881           0 :             level = 0;
   30882             :         }
   30883             :         #endif
   30884           0 :         if (!module) {
   30885             :             #if PY_MAJOR_VERSION < 3
   30886             :             PyObject *py_level = PyInt_FromLong(level);
   30887             :             if (unlikely(!py_level))
   30888             :                 goto bad;
   30889             :             module = PyObject_CallFunctionObjArgs(py_import,
   30890             :                 name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL);
   30891             :             Py_DECREF(py_level);
   30892             :             #else
   30893           9 :             module = PyImport_ImportModuleLevelObject(
   30894           9 :                 name, __pyx_d, empty_dict, from_list, level);
   30895             :             #endif
   30896             :         }
   30897             :     }
   30898           9 : bad:
   30899           9 :     Py_XDECREF(empty_dict);
   30900           9 :     Py_XDECREF(empty_list);
   30901             :     #if PY_MAJOR_VERSION < 3
   30902             :     Py_XDECREF(py_import);
   30903             :     #endif
   30904           9 :     return module;
   30905             : }
   30906             : 
   30907             : /* ImportDottedModule */
   30908             : #if PY_MAJOR_VERSION >= 3
   30909           0 : static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) {
   30910           0 :     PyObject *partial_name = NULL, *slice = NULL, *sep = NULL;
   30911           0 :     if (unlikely(PyErr_Occurred())) {
   30912           0 :         PyErr_Clear();
   30913             :     }
   30914           0 :     if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) {
   30915             :         partial_name = name;
   30916             :     } else {
   30917           0 :         slice = PySequence_GetSlice(parts_tuple, 0, count);
   30918           0 :         if (unlikely(!slice))
   30919           0 :             goto bad;
   30920           0 :         sep = PyUnicode_FromStringAndSize(".", 1);
   30921           0 :         if (unlikely(!sep))
   30922           0 :             goto bad;
   30923           0 :         partial_name = PyUnicode_Join(sep, slice);
   30924             :     }
   30925           0 :     PyErr_Format(
   30926             : #if PY_MAJOR_VERSION < 3
   30927             :         PyExc_ImportError,
   30928             :         "No module named '%s'", PyString_AS_STRING(partial_name));
   30929             : #else
   30930             : #if PY_VERSION_HEX >= 0x030600B1
   30931             :         PyExc_ModuleNotFoundError,
   30932             : #else
   30933             :         PyExc_ImportError,
   30934             : #endif
   30935             :         "No module named '%U'", partial_name);
   30936             : #endif
   30937           0 : bad:
   30938           0 :     Py_XDECREF(sep);
   30939           0 :     Py_XDECREF(slice);
   30940           0 :     Py_XDECREF(partial_name);
   30941           0 :     return NULL;
   30942             : }
   30943             : #endif
   30944             : #if PY_MAJOR_VERSION >= 3
   30945           6 : static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) {
   30946           6 :     PyObject *imported_module;
   30947             : #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
   30948             :     PyObject *modules = PyImport_GetModuleDict();
   30949             :     if (unlikely(!modules))
   30950             :         return NULL;
   30951             :     imported_module = __Pyx_PyDict_GetItemStr(modules, name);
   30952             :     Py_XINCREF(imported_module);
   30953             : #else
   30954          12 :     imported_module = PyImport_GetModule(name);
   30955             : #endif
   30956           6 :     return imported_module;
   30957             : }
   30958             : #endif
   30959             : #if PY_MAJOR_VERSION >= 3
   30960           0 : static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) {
   30961           0 :     Py_ssize_t i, nparts;
   30962           0 :     nparts = PyTuple_GET_SIZE(parts_tuple);
   30963           0 :     for (i=1; i < nparts && module; i++) {
   30964           0 :         PyObject *part, *submodule;
   30965             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   30966           0 :         part = PyTuple_GET_ITEM(parts_tuple, i);
   30967             : #else
   30968             :         part = PySequence_ITEM(parts_tuple, i);
   30969             : #endif
   30970           0 :         submodule = __Pyx_PyObject_GetAttrStrNoError(module, part);
   30971             : #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
   30972             :         Py_DECREF(part);
   30973             : #endif
   30974           0 :         Py_DECREF(module);
   30975           0 :         module = submodule;
   30976             :     }
   30977           0 :     if (unlikely(!module)) {
   30978           0 :         return __Pyx__ImportDottedModule_Error(name, parts_tuple, i);
   30979             :     }
   30980             :     return module;
   30981             : }
   30982             : #endif
   30983           0 : static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
   30984             : #if PY_MAJOR_VERSION < 3
   30985             :     PyObject *module, *from_list, *star = __pyx_n_s__3;
   30986             :     CYTHON_UNUSED_VAR(parts_tuple);
   30987             :     from_list = PyList_New(1);
   30988             :     if (unlikely(!from_list))
   30989             :         return NULL;
   30990             :     Py_INCREF(star);
   30991             :     PyList_SET_ITEM(from_list, 0, star);
   30992             :     module = __Pyx_Import(name, from_list, 0);
   30993             :     Py_DECREF(from_list);
   30994             :     return module;
   30995             : #else
   30996           0 :     PyObject *imported_module;
   30997           0 :     PyObject *module = __Pyx_Import(name, NULL, 0);
   30998           0 :     if (!parts_tuple || unlikely(!module))
   30999             :         return module;
   31000           0 :     imported_module = __Pyx__ImportDottedModule_Lookup(name);
   31001           0 :     if (likely(imported_module)) {
   31002           0 :         Py_DECREF(module);
   31003           0 :         return imported_module;
   31004             :     }
   31005           0 :     PyErr_Clear();
   31006           0 :     return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple);
   31007             : #endif
   31008             : }
   31009           6 : static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
   31010             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1
   31011           6 :     PyObject *module = __Pyx__ImportDottedModule_Lookup(name);
   31012           6 :     if (likely(module)) {
   31013           6 :         PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec);
   31014           6 :         if (likely(spec)) {
   31015           6 :             PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing);
   31016           6 :             if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) {
   31017           6 :                 Py_DECREF(spec);
   31018             :                 spec = NULL;
   31019             :             }
   31020           6 :             Py_XDECREF(unsafe);
   31021             :         }
   31022           6 :         if (likely(!spec)) {
   31023           6 :             PyErr_Clear();
   31024           6 :             return module;
   31025             :         }
   31026           0 :         Py_DECREF(spec);
   31027           0 :         Py_DECREF(module);
   31028           0 :     } else if (PyErr_Occurred()) {
   31029           0 :         PyErr_Clear();
   31030             :     }
   31031             : #endif
   31032           0 :     return __Pyx__ImportDottedModule(name, parts_tuple);
   31033             : }
   31034             : 
   31035             : /* FastTypeChecks */
   31036             : #if CYTHON_COMPILING_IN_CPYTHON
   31037             : static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
   31038           0 :     while (a) {
   31039           0 :         a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
   31040           0 :         if (a == b)
   31041             :             return 1;
   31042             :     }
   31043           0 :     return b == &PyBaseObject_Type;
   31044             : }
   31045        1964 : static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
   31046        1964 :     PyObject *mro;
   31047        1964 :     if (a == b) return 1;
   31048        1964 :     mro = a->tp_mro;
   31049        1964 :     if (likely(mro)) {
   31050        1964 :         Py_ssize_t i, n;
   31051        1964 :         n = PyTuple_GET_SIZE(mro);
   31052        5892 :         for (i = 0; i < n; i++) {
   31053        3928 :             if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
   31054             :                 return 1;
   31055             :         }
   31056             :         return 0;
   31057             :     }
   31058        1964 :     return __Pyx_InBases(a, b);
   31059             : }
   31060        1445 : static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
   31061        1445 :     PyObject *mro;
   31062        1445 :     if (cls == a || cls == b) return 1;
   31063         995 :     mro = cls->tp_mro;
   31064         995 :     if (likely(mro)) {
   31065         995 :         Py_ssize_t i, n;
   31066         995 :         n = PyTuple_GET_SIZE(mro);
   31067        2985 :         for (i = 0; i < n; i++) {
   31068        1990 :             PyObject *base = PyTuple_GET_ITEM(mro, i);
   31069        1990 :             if (base == (PyObject *)a || base == (PyObject *)b)
   31070             :                 return 1;
   31071             :         }
   31072             :         return 0;
   31073             :     }
   31074           0 :     return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
   31075             : }
   31076             : #if PY_MAJOR_VERSION == 2
   31077             : static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
   31078             :     PyObject *exception, *value, *tb;
   31079             :     int res;
   31080             :     __Pyx_PyThreadState_declare
   31081             :     __Pyx_PyThreadState_assign
   31082             :     __Pyx_ErrFetch(&exception, &value, &tb);
   31083             :     res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
   31084             :     if (unlikely(res == -1)) {
   31085             :         PyErr_WriteUnraisable(err);
   31086             :         res = 0;
   31087             :     }
   31088             :     if (!res) {
   31089             :         res = PyObject_IsSubclass(err, exc_type2);
   31090             :         if (unlikely(res == -1)) {
   31091             :             PyErr_WriteUnraisable(err);
   31092             :             res = 0;
   31093             :         }
   31094             :     }
   31095             :     __Pyx_ErrRestore(exception, value, tb);
   31096             :     return res;
   31097             : }
   31098             : #else
   31099           0 : static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
   31100           0 :     if (exc_type1) {
   31101             :         return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
   31102             :     } else {
   31103           0 :         return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
   31104             :     }
   31105             : }
   31106             : #endif
   31107           0 : static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
   31108           0 :     Py_ssize_t i, n;
   31109           0 :     assert(PyExceptionClass_Check(exc_type));
   31110           0 :     n = PyTuple_GET_SIZE(tuple);
   31111             : #if PY_MAJOR_VERSION >= 3
   31112           0 :     for (i=0; i<n; i++) {
   31113           0 :         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
   31114             :     }
   31115             : #endif
   31116           0 :     for (i=0; i<n; i++) {
   31117           0 :         PyObject *t = PyTuple_GET_ITEM(tuple, i);
   31118             :         #if PY_MAJOR_VERSION < 3
   31119             :         if (likely(exc_type == t)) return 1;
   31120             :         #endif
   31121           0 :         if (likely(PyExceptionClass_Check(t))) {
   31122           0 :             if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
   31123             :         } else {
   31124           0 :         }
   31125             :     }
   31126             :     return 0;
   31127             : }
   31128           0 : static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
   31129           0 :     if (likely(err == exc_type)) return 1;
   31130           0 :     if (likely(PyExceptionClass_Check(err))) {
   31131           0 :         if (likely(PyExceptionClass_Check(exc_type))) {
   31132           0 :             return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
   31133           0 :         } else if (likely(PyTuple_Check(exc_type))) {
   31134           0 :             return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
   31135             :         } else {
   31136           0 :         }
   31137             :     }
   31138           0 :     return PyErr_GivenExceptionMatches(err, exc_type);
   31139             : }
   31140             : static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
   31141             :     assert(PyExceptionClass_Check(exc_type1));
   31142             :     assert(PyExceptionClass_Check(exc_type2));
   31143             :     if (likely(err == exc_type1 || err == exc_type2)) return 1;
   31144             :     if (likely(PyExceptionClass_Check(err))) {
   31145             :         return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
   31146             :     }
   31147             :     return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
   31148             : }
   31149             : #endif
   31150             : 
   31151             : /* PySequenceMultiply */
   31152           0 : static PyObject* __Pyx_PySequence_Multiply_Generic(PyObject *seq, Py_ssize_t mul) {
   31153           0 :     PyObject *result, *pymul = PyInt_FromSsize_t(mul);
   31154           0 :     if (unlikely(!pymul))
   31155             :         return NULL;
   31156           0 :     result = PyNumber_Multiply(seq, pymul);
   31157           0 :     Py_DECREF(pymul);
   31158             :     return result;
   31159             : }
   31160           0 : static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul) {
   31161             : #if CYTHON_USE_TYPE_SLOTS
   31162           0 :     PyTypeObject *type = Py_TYPE(seq);
   31163           0 :     if (likely(type->tp_as_sequence && type->tp_as_sequence->sq_repeat)) {
   31164           0 :         return type->tp_as_sequence->sq_repeat(seq, mul);
   31165             :     } else
   31166             : #endif
   31167             :     {
   31168           0 :         return __Pyx_PySequence_Multiply_Generic(seq, mul);
   31169             :     }
   31170             : }
   31171             : 
   31172             : /* SetItemInt */
   31173           0 : static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
   31174           0 :     int r;
   31175           0 :     if (unlikely(!j)) return -1;
   31176           0 :     r = PyObject_SetItem(o, j, v);
   31177           0 :     Py_DECREF(j);
   31178             :     return r;
   31179             : }
   31180           0 : static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
   31181             :                                                CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
   31182             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
   31183           0 :     if (is_list || PyList_CheckExact(o)) {
   31184           0 :         Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
   31185           0 :         if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
   31186           0 :             PyObject* old = PyList_GET_ITEM(o, n);
   31187           0 :             Py_INCREF(v);
   31188           0 :             PyList_SET_ITEM(o, n, v);
   31189           0 :             Py_DECREF(old);
   31190           0 :             return 1;
   31191             :         }
   31192             :     } else {
   31193           0 :         PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
   31194           0 :         PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
   31195           0 :         if (mm && mm->mp_ass_subscript) {
   31196           0 :             int r;
   31197           0 :             PyObject *key = PyInt_FromSsize_t(i);
   31198           0 :             if (unlikely(!key)) return -1;
   31199           0 :             r = mm->mp_ass_subscript(o, key, v);
   31200           0 :             Py_DECREF(key);
   31201           0 :             return r;
   31202             :         }
   31203           0 :         if (likely(sm && sm->sq_ass_item)) {
   31204           0 :             if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
   31205           0 :                 Py_ssize_t l = sm->sq_length(o);
   31206           0 :                 if (likely(l >= 0)) {
   31207           0 :                     i += l;
   31208             :                 } else {
   31209           0 :                     if (!PyErr_ExceptionMatches(PyExc_OverflowError))
   31210             :                         return -1;
   31211           0 :                     PyErr_Clear();
   31212             :                 }
   31213             :             }
   31214           0 :             return sm->sq_ass_item(o, i, v);
   31215             :         }
   31216             :     }
   31217             : #else
   31218             :     if (is_list || !PyMapping_Check(o))
   31219             :     {
   31220             :         return PySequence_SetItem(o, i, v);
   31221             :     }
   31222             : #endif
   31223           0 :     return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
   31224             : }
   31225             : 
   31226             : /* RaiseUnboundLocalError */
   31227           0 : static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
   31228           0 :     PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
   31229             : }
   31230             : 
   31231             : /* DivInt[long] */
   31232           0 : static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
   31233           0 :     long q = a / b;
   31234           0 :     long r = a - q*b;
   31235           0 :     q -= ((r != 0) & ((r ^ b) < 0));
   31236           0 :     return q;
   31237             : }
   31238             : 
   31239             : /* ImportFrom */
   31240          12 : static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
   31241          12 :     PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
   31242          12 :     if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
   31243           0 :         const char* module_name_str = 0;
   31244           0 :         PyObject* module_name = 0;
   31245           0 :         PyObject* module_dot = 0;
   31246           0 :         PyObject* full_name = 0;
   31247           0 :         PyErr_Clear();
   31248           0 :         module_name_str = PyModule_GetName(module);
   31249           0 :         if (unlikely(!module_name_str)) { goto modbad; }
   31250           0 :         module_name = PyUnicode_FromString(module_name_str);
   31251           0 :         if (unlikely(!module_name)) { goto modbad; }
   31252           0 :         module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__2);
   31253           0 :         if (unlikely(!module_dot)) { goto modbad; }
   31254           0 :         full_name = PyUnicode_Concat(module_dot, name);
   31255           0 :         if (unlikely(!full_name)) { goto modbad; }
   31256             :         #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
   31257             :         {
   31258             :             PyObject *modules = PyImport_GetModuleDict();
   31259             :             if (unlikely(!modules))
   31260             :                 goto modbad;
   31261             :             value = PyObject_GetItem(modules, full_name);
   31262             :         }
   31263             :         #else
   31264           0 :         value = PyImport_GetModule(full_name);
   31265             :         #endif
   31266           0 :       modbad:
   31267           0 :         Py_XDECREF(full_name);
   31268           0 :         Py_XDECREF(module_dot);
   31269           0 :         Py_XDECREF(module_name);
   31270             :     }
   31271          12 :     if (unlikely(!value)) {
   31272           0 :         PyErr_Format(PyExc_ImportError,
   31273             :         #if PY_MAJOR_VERSION < 3
   31274             :             "cannot import name %.230s", PyString_AS_STRING(name));
   31275             :         #else
   31276             :             "cannot import name %S", name);
   31277             :         #endif
   31278             :     }
   31279          12 :     return value;
   31280             : }
   31281             : 
   31282             : /* HasAttr */
   31283           0 : static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
   31284           0 :     PyObject *r;
   31285           0 :     if (unlikely(!__Pyx_PyBaseString_Check(n))) {
   31286           0 :         PyErr_SetString(PyExc_TypeError,
   31287             :                         "hasattr(): attribute name must be string");
   31288           0 :         return -1;
   31289             :     }
   31290           0 :     r = __Pyx_GetAttr(o, n);
   31291           0 :     if (!r) {
   31292           0 :         PyErr_Clear();
   31293           0 :         return 0;
   31294             :     } else {
   31295           0 :         Py_DECREF(r);
   31296           0 :         return 1;
   31297             :     }
   31298             : }
   31299             : 
   31300             : /* IterFinish */
   31301           0 : static CYTHON_INLINE int __Pyx_IterFinish(void) {
   31302           0 :     PyObject* exc_type;
   31303           0 :     __Pyx_PyThreadState_declare
   31304           0 :     __Pyx_PyThreadState_assign
   31305           0 :     exc_type = __Pyx_PyErr_CurrentExceptionType();
   31306           0 :     if (unlikely(exc_type)) {
   31307           0 :         if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
   31308             :             return -1;
   31309           0 :         __Pyx_PyErr_Clear();
   31310           0 :         return 0;
   31311             :     }
   31312             :     return 0;
   31313             : }
   31314             : 
   31315             : /* UnpackItemEndCheck */
   31316           0 : static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
   31317           0 :     if (unlikely(retval)) {
   31318           0 :         Py_DECREF(retval);
   31319           0 :         __Pyx_RaiseTooManyValuesError(expected);
   31320           0 :         return -1;
   31321             :     }
   31322           0 :     return __Pyx_IterFinish();
   31323             : }
   31324             : 
   31325             : /* PyObjectFormatAndDecref */
   31326           0 : static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
   31327           0 :     if (unlikely(!s)) return NULL;
   31328           0 :     if (likely(PyUnicode_CheckExact(s))) return s;
   31329             :     #if PY_MAJOR_VERSION < 3
   31330             :     if (likely(PyString_CheckExact(s))) {
   31331             :         PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict");
   31332             :         Py_DECREF(s);
   31333             :         return result;
   31334             :     }
   31335             :     #endif
   31336           0 :     return __Pyx_PyObject_FormatAndDecref(s, f);
   31337             : }
   31338           0 : static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
   31339           0 :     PyObject *result;
   31340           0 :     if (unlikely(!s)) return NULL;
   31341           0 :     result = PyObject_Format(s, f);
   31342           0 :     Py_DECREF(s);
   31343             :     return result;
   31344             : }
   31345             : 
   31346             : /* PyIntCompare */
   31347         111 : static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
   31348         111 :     CYTHON_MAYBE_UNUSED_VAR(intval);
   31349         111 :     CYTHON_UNUSED_VAR(inplace);
   31350         111 :     if (op1 == op2) {
   31351             :         Py_RETURN_FALSE;
   31352             :     }
   31353             :     #if PY_MAJOR_VERSION < 3
   31354             :     if (likely(PyInt_CheckExact(op1))) {
   31355             :         const long b = intval;
   31356             :         long a = PyInt_AS_LONG(op1);
   31357             :         if (a != b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
   31358             :     }
   31359             :     #endif
   31360             :     #if CYTHON_USE_PYLONG_INTERNALS
   31361         111 :     if (likely(PyLong_CheckExact(op1))) {
   31362           0 :         int unequal;
   31363           0 :         unsigned long uintval;
   31364           0 :         Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
   31365           0 :         const digit* digits = __Pyx_PyLong_Digits(op1);
   31366           0 :         if (intval == 0) {
   31367           0 :             if (__Pyx_PyLong_IsZero(op1) != 1) Py_RETURN_TRUE; else Py_RETURN_FALSE;
   31368           0 :         } else if (intval < 0) {
   31369           0 :             if (__Pyx_PyLong_IsNonNeg(op1))
   31370             :                 Py_RETURN_TRUE;
   31371           0 :             intval = -intval;
   31372             :         } else {
   31373           0 :             if (__Pyx_PyLong_IsNeg(op1))
   31374             :                 Py_RETURN_TRUE;
   31375             :         }
   31376           0 :         uintval = (unsigned long) intval;
   31377             : #if PyLong_SHIFT * 4 < SIZEOF_LONG*8
   31378             :         if (uintval >> (PyLong_SHIFT * 4)) {
   31379             :             unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
   31380             :                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
   31381             :         } else
   31382             : #endif
   31383             : #if PyLong_SHIFT * 3 < SIZEOF_LONG*8
   31384             :         if (uintval >> (PyLong_SHIFT * 3)) {
   31385             :             unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
   31386             :                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
   31387             :         } else
   31388             : #endif
   31389             : #if PyLong_SHIFT * 2 < SIZEOF_LONG*8
   31390           0 :         if (uintval >> (PyLong_SHIFT * 2)) {
   31391           0 :             unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
   31392           0 :                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
   31393             :         } else
   31394             : #endif
   31395             : #if PyLong_SHIFT * 1 < SIZEOF_LONG*8
   31396           0 :         if (uintval >> (PyLong_SHIFT * 1)) {
   31397           0 :             unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
   31398           0 :                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
   31399             :         } else
   31400             : #endif
   31401           0 :             unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
   31402           0 :         if (unequal != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
   31403             :     }
   31404             :     #endif
   31405         111 :     if (PyFloat_CheckExact(op1)) {
   31406           0 :         const long b = intval;
   31407             : #if CYTHON_COMPILING_IN_LIMITED_API
   31408             :         double a = __pyx_PyFloat_AsDouble(op1);
   31409             : #else
   31410           0 :         double a = PyFloat_AS_DOUBLE(op1);
   31411             : #endif
   31412           0 :         if ((double)a != (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
   31413             :     }
   31414         111 :     return (
   31415         111 :         PyObject_RichCompare(op1, op2, Py_NE));
   31416             : }
   31417             : 
   31418             : /* PyObject_GenericGetAttrNoDict */
   31419             : #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
   31420             : static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
   31421             :     __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp);
   31422             :     PyErr_Format(PyExc_AttributeError,
   31423             : #if PY_MAJOR_VERSION >= 3
   31424             :                  "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
   31425             :                  type_name, attr_name);
   31426             : #else
   31427             :                  "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
   31428             :                  type_name, PyString_AS_STRING(attr_name));
   31429             : #endif
   31430             :     __Pyx_DECREF_TypeName(type_name);
   31431             :     return NULL;
   31432             : }
   31433             : static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
   31434             :     PyObject *descr;
   31435             :     PyTypeObject *tp = Py_TYPE(obj);
   31436             :     if (unlikely(!PyString_Check(attr_name))) {
   31437             :         return PyObject_GenericGetAttr(obj, attr_name);
   31438             :     }
   31439             :     assert(!tp->tp_dictoffset);
   31440             :     descr = _PyType_Lookup(tp, attr_name);
   31441             :     if (unlikely(!descr)) {
   31442             :         return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
   31443             :     }
   31444             :     Py_INCREF(descr);
   31445             :     #if PY_MAJOR_VERSION < 3
   31446             :     if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
   31447             :     #endif
   31448             :     {
   31449             :         descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
   31450             :         if (unlikely(f)) {
   31451             :             PyObject *res = f(descr, obj, (PyObject *)tp);
   31452             :             Py_DECREF(descr);
   31453             :             return res;
   31454             :         }
   31455             :     }
   31456             :     return descr;
   31457             : }
   31458             : #endif
   31459             : 
   31460             : /* PyObject_GenericGetAttr */
   31461             : #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
   31462             : static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
   31463             :     if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
   31464             :         return PyObject_GenericGetAttr(obj, attr_name);
   31465             :     }
   31466             :     return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
   31467             : }
   31468             : #endif
   31469             : 
   31470             : /* FixUpExtensionType */
   31471             : #if CYTHON_USE_TYPE_SPECS
   31472             : static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
   31473             : #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
   31474             :     CYTHON_UNUSED_VAR(spec);
   31475             :     CYTHON_UNUSED_VAR(type);
   31476             : #else
   31477             :     const PyType_Slot *slot = spec->slots;
   31478             :     while (slot && slot->slot && slot->slot != Py_tp_members)
   31479             :         slot++;
   31480             :     if (slot && slot->slot == Py_tp_members) {
   31481             :         int changed = 0;
   31482             : #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
   31483             :         const
   31484             : #endif
   31485             :             PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
   31486             :         while (memb && memb->name) {
   31487             :             if (memb->name[0] == '_' && memb->name[1] == '_') {
   31488             : #if PY_VERSION_HEX < 0x030900b1
   31489             :                 if (strcmp(memb->name, "__weaklistoffset__") == 0) {
   31490             :                     assert(memb->type == T_PYSSIZET);
   31491             :                     assert(memb->flags == READONLY);
   31492             :                     type->tp_weaklistoffset = memb->offset;
   31493             :                     changed = 1;
   31494             :                 }
   31495             :                 else if (strcmp(memb->name, "__dictoffset__") == 0) {
   31496             :                     assert(memb->type == T_PYSSIZET);
   31497             :                     assert(memb->flags == READONLY);
   31498             :                     type->tp_dictoffset = memb->offset;
   31499             :                     changed = 1;
   31500             :                 }
   31501             : #if CYTHON_METH_FASTCALL
   31502             :                 else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
   31503             :                     assert(memb->type == T_PYSSIZET);
   31504             :                     assert(memb->flags == READONLY);
   31505             : #if PY_VERSION_HEX >= 0x030800b4
   31506             :                     type->tp_vectorcall_offset = memb->offset;
   31507             : #else
   31508             :                     type->tp_print = (printfunc) memb->offset;
   31509             : #endif
   31510             :                     changed = 1;
   31511             :                 }
   31512             : #endif
   31513             : #else
   31514             :                 if ((0));
   31515             : #endif
   31516             : #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
   31517             :                 else if (strcmp(memb->name, "__module__") == 0) {
   31518             :                     PyObject *descr;
   31519             :                     assert(memb->type == T_OBJECT);
   31520             :                     assert(memb->flags == 0 || memb->flags == READONLY);
   31521             :                     descr = PyDescr_NewMember(type, memb);
   31522             :                     if (unlikely(!descr))
   31523             :                         return -1;
   31524             :                     if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
   31525             :                         Py_DECREF(descr);
   31526             :                         return -1;
   31527             :                     }
   31528             :                     Py_DECREF(descr);
   31529             :                     changed = 1;
   31530             :                 }
   31531             : #endif
   31532             :             }
   31533             :             memb++;
   31534             :         }
   31535             :         if (changed)
   31536             :             PyType_Modified(type);
   31537             :     }
   31538             : #endif
   31539             :     return 0;
   31540             : }
   31541             : #endif
   31542             : 
   31543             : /* PyObjectCallNoArg */
   31544             : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
   31545             :     PyObject *arg[2] = {NULL, NULL};
   31546             :     return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
   31547             : }
   31548             : 
   31549             : /* PyObjectGetMethod */
   31550             : static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
   31551             :     PyObject *attr;
   31552             : #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
   31553             :     __Pyx_TypeName type_name;
   31554             :     PyTypeObject *tp = Py_TYPE(obj);
   31555             :     PyObject *descr;
   31556             :     descrgetfunc f = NULL;
   31557             :     PyObject **dictptr, *dict;
   31558             :     int meth_found = 0;
   31559             :     assert (*method == NULL);
   31560             :     if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
   31561             :         attr = __Pyx_PyObject_GetAttrStr(obj, name);
   31562             :         goto try_unpack;
   31563             :     }
   31564             :     if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
   31565             :         return 0;
   31566             :     }
   31567             :     descr = _PyType_Lookup(tp, name);
   31568             :     if (likely(descr != NULL)) {
   31569             :         Py_INCREF(descr);
   31570             : #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
   31571             :         if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
   31572             : #elif PY_MAJOR_VERSION >= 3
   31573             :         #ifdef __Pyx_CyFunction_USED
   31574             :         if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
   31575             :         #else
   31576             :         if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
   31577             :         #endif
   31578             : #else
   31579             :         #ifdef __Pyx_CyFunction_USED
   31580             :         if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
   31581             :         #else
   31582             :         if (likely(PyFunction_Check(descr)))
   31583             :         #endif
   31584             : #endif
   31585             :         {
   31586             :             meth_found = 1;
   31587             :         } else {
   31588             :             f = Py_TYPE(descr)->tp_descr_get;
   31589             :             if (f != NULL && PyDescr_IsData(descr)) {
   31590             :                 attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
   31591             :                 Py_DECREF(descr);
   31592             :                 goto try_unpack;
   31593             :             }
   31594             :         }
   31595             :     }
   31596             :     dictptr = _PyObject_GetDictPtr(obj);
   31597             :     if (dictptr != NULL && (dict = *dictptr) != NULL) {
   31598             :         Py_INCREF(dict);
   31599             :         attr = __Pyx_PyDict_GetItemStr(dict, name);
   31600             :         if (attr != NULL) {
   31601             :             Py_INCREF(attr);
   31602             :             Py_DECREF(dict);
   31603             :             Py_XDECREF(descr);
   31604             :             goto try_unpack;
   31605             :         }
   31606             :         Py_DECREF(dict);
   31607             :     }
   31608             :     if (meth_found) {
   31609             :         *method = descr;
   31610             :         return 1;
   31611             :     }
   31612             :     if (f != NULL) {
   31613             :         attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
   31614             :         Py_DECREF(descr);
   31615             :         goto try_unpack;
   31616             :     }
   31617             :     if (likely(descr != NULL)) {
   31618             :         *method = descr;
   31619             :         return 0;
   31620             :     }
   31621             :     type_name = __Pyx_PyType_GetName(tp);
   31622             :     PyErr_Format(PyExc_AttributeError,
   31623             : #if PY_MAJOR_VERSION >= 3
   31624             :                  "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
   31625             :                  type_name, name);
   31626             : #else
   31627             :                  "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
   31628             :                  type_name, PyString_AS_STRING(name));
   31629             : #endif
   31630             :     __Pyx_DECREF_TypeName(type_name);
   31631             :     return 0;
   31632             : #else
   31633             :     attr = __Pyx_PyObject_GetAttrStr(obj, name);
   31634             :     goto try_unpack;
   31635             : #endif
   31636             : try_unpack:
   31637             : #if CYTHON_UNPACK_METHODS
   31638             :     if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
   31639             :         PyObject *function = PyMethod_GET_FUNCTION(attr);
   31640             :         Py_INCREF(function);
   31641             :         Py_DECREF(attr);
   31642             :         *method = function;
   31643             :         return 1;
   31644             :     }
   31645             : #endif
   31646             :     *method = attr;
   31647             :     return 0;
   31648             : }
   31649             : 
   31650             : /* PyObjectCallMethod0 */
   31651             : static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
   31652             :     PyObject *method = NULL, *result = NULL;
   31653             :     int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
   31654             :     if (likely(is_method)) {
   31655             :         result = __Pyx_PyObject_CallOneArg(method, obj);
   31656             :         Py_DECREF(method);
   31657             :         return result;
   31658             :     }
   31659             :     if (unlikely(!method)) goto bad;
   31660             :     result = __Pyx_PyObject_CallNoArg(method);
   31661             :     Py_DECREF(method);
   31662             : bad:
   31663             :     return result;
   31664             : }
   31665             : 
   31666             : /* ValidateBasesTuple */
   31667             : #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
   31668           0 : static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
   31669           0 :     Py_ssize_t i, n;
   31670             : #if CYTHON_ASSUME_SAFE_MACROS
   31671           0 :     n = PyTuple_GET_SIZE(bases);
   31672             : #else
   31673             :     n = PyTuple_Size(bases);
   31674             :     if (n < 0) return -1;
   31675             : #endif
   31676           0 :     for (i = 1; i < n; i++)
   31677             :     {
   31678             : #if CYTHON_AVOID_BORROWED_REFS
   31679             :         PyObject *b0 = PySequence_GetItem(bases, i);
   31680             :         if (!b0) return -1;
   31681             : #elif CYTHON_ASSUME_SAFE_MACROS
   31682           0 :         PyObject *b0 = PyTuple_GET_ITEM(bases, i);
   31683             : #else
   31684             :         PyObject *b0 = PyTuple_GetItem(bases, i);
   31685             :         if (!b0) return -1;
   31686             : #endif
   31687           0 :         PyTypeObject *b;
   31688             : #if PY_MAJOR_VERSION < 3
   31689             :         if (PyClass_Check(b0))
   31690             :         {
   31691             :             PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class",
   31692             :                          PyString_AS_STRING(((PyClassObject*)b0)->cl_name));
   31693             : #if CYTHON_AVOID_BORROWED_REFS
   31694             :             Py_DECREF(b0);
   31695             : #endif
   31696             :             return -1;
   31697             :         }
   31698             : #endif
   31699           0 :         b = (PyTypeObject*) b0;
   31700           0 :         if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
   31701             :         {
   31702           0 :             __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
   31703           0 :             PyErr_Format(PyExc_TypeError,
   31704             :                 "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
   31705           0 :             __Pyx_DECREF_TypeName(b_name);
   31706             : #if CYTHON_AVOID_BORROWED_REFS
   31707             :             Py_DECREF(b0);
   31708             : #endif
   31709           0 :             return -1;
   31710             :         }
   31711           0 :         if (dictoffset == 0)
   31712             :         {
   31713           0 :             Py_ssize_t b_dictoffset = 0;
   31714             : #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
   31715           0 :             b_dictoffset = b->tp_dictoffset;
   31716             : #else
   31717             :             PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
   31718             :             if (!py_b_dictoffset) goto dictoffset_return;
   31719             :             b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
   31720             :             Py_DECREF(py_b_dictoffset);
   31721             :             if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
   31722             : #endif
   31723           0 :             if (b_dictoffset) {
   31724             :                 {
   31725           0 :                     __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
   31726           0 :                     PyErr_Format(PyExc_TypeError,
   31727             :                         "extension type '%.200s' has no __dict__ slot, "
   31728             :                         "but base type '" __Pyx_FMT_TYPENAME "' has: "
   31729             :                         "either add 'cdef dict __dict__' to the extension type "
   31730             :                         "or add '__slots__ = [...]' to the base type",
   31731             :                         type_name, b_name);
   31732           0 :                     __Pyx_DECREF_TypeName(b_name);
   31733             :                 }
   31734             : #if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY)
   31735             :               dictoffset_return:
   31736             : #endif
   31737             : #if CYTHON_AVOID_BORROWED_REFS
   31738             :                 Py_DECREF(b0);
   31739             : #endif
   31740           0 :                 return -1;
   31741             :             }
   31742             :         }
   31743             : #if CYTHON_AVOID_BORROWED_REFS
   31744             :         Py_DECREF(b0);
   31745             : #endif
   31746             :     }
   31747             :     return 0;
   31748             : }
   31749             : #endif
   31750             : 
   31751             : /* PyType_Ready */
   31752          12 : static int __Pyx_PyType_Ready(PyTypeObject *t) {
   31753             : #if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION)
   31754             :     (void)__Pyx_PyObject_CallMethod0;
   31755             : #if CYTHON_USE_TYPE_SPECS
   31756             :     (void)__Pyx_validate_bases_tuple;
   31757             : #endif
   31758             :     return PyType_Ready(t);
   31759             : #else
   31760          12 :     int r;
   31761          12 :     PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
   31762          12 :     if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
   31763             :         return -1;
   31764             : #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
   31765             :     {
   31766          12 :         int gc_was_enabled;
   31767             :     #if PY_VERSION_HEX >= 0x030A00b1
   31768          12 :         gc_was_enabled = PyGC_Disable();
   31769          12 :         (void)__Pyx_PyObject_CallMethod0;
   31770             :     #else
   31771             :         PyObject *ret, *py_status;
   31772             :         PyObject *gc = NULL;
   31773             :         #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400)
   31774             :         gc = PyImport_GetModule(__pyx_kp_u_gc);
   31775             :         #endif
   31776             :         if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc);
   31777             :         if (unlikely(!gc)) return -1;
   31778             :         py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled);
   31779             :         if (unlikely(!py_status)) {
   31780             :             Py_DECREF(gc);
   31781             :             return -1;
   31782             :         }
   31783             :         gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
   31784             :         Py_DECREF(py_status);
   31785             :         if (gc_was_enabled > 0) {
   31786             :             ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable);
   31787             :             if (unlikely(!ret)) {
   31788             :                 Py_DECREF(gc);
   31789             :                 return -1;
   31790             :             }
   31791             :             Py_DECREF(ret);
   31792             :         } else if (unlikely(gc_was_enabled == -1)) {
   31793             :             Py_DECREF(gc);
   31794             :             return -1;
   31795             :         }
   31796             :     #endif
   31797          12 :         t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
   31798             : #if PY_VERSION_HEX >= 0x030A0000
   31799          12 :         t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
   31800             : #endif
   31801             : #else
   31802             :         (void)__Pyx_PyObject_CallMethod0;
   31803             : #endif
   31804          12 :     r = PyType_Ready(t);
   31805             : #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
   31806          12 :         t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
   31807             :     #if PY_VERSION_HEX >= 0x030A00b1
   31808          12 :         if (gc_was_enabled)
   31809          12 :             PyGC_Enable();
   31810             :     #else
   31811             :         if (gc_was_enabled) {
   31812             :             PyObject *tp, *v, *tb;
   31813             :             PyErr_Fetch(&tp, &v, &tb);
   31814             :             ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable);
   31815             :             if (likely(ret || r == -1)) {
   31816             :                 Py_XDECREF(ret);
   31817             :                 PyErr_Restore(tp, v, tb);
   31818             :             } else {
   31819             :                 Py_XDECREF(tp);
   31820             :                 Py_XDECREF(v);
   31821             :                 Py_XDECREF(tb);
   31822             :                 r = -1;
   31823             :             }
   31824             :         }
   31825             :         Py_DECREF(gc);
   31826             :     #endif
   31827             :     }
   31828             : #endif
   31829             :     return r;
   31830             : #endif
   31831             : }
   31832             : 
   31833             : /* SetVTable */
   31834           9 : static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
   31835           9 :     PyObject *ob = PyCapsule_New(vtable, 0, 0);
   31836           9 :     if (unlikely(!ob))
   31837           0 :         goto bad;
   31838             : #if CYTHON_COMPILING_IN_LIMITED_API
   31839             :     if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0))
   31840             : #else
   31841           9 :     if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0))
   31842             : #endif
   31843           0 :         goto bad;
   31844           9 :     Py_DECREF(ob);
   31845             :     return 0;
   31846           0 : bad:
   31847           0 :     Py_XDECREF(ob);
   31848           0 :     return -1;
   31849             : }
   31850             : 
   31851             : /* GetVTable */
   31852           0 : static void* __Pyx_GetVtable(PyTypeObject *type) {
   31853           0 :     void* ptr;
   31854             : #if CYTHON_COMPILING_IN_LIMITED_API
   31855             :     PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable);
   31856             : #else
   31857           0 :     PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable);
   31858             : #endif
   31859           0 :     if (!ob)
   31860           0 :         goto bad;
   31861           0 :     ptr = PyCapsule_GetPointer(ob, 0);
   31862           0 :     if (!ptr && !PyErr_Occurred())
   31863           0 :         PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
   31864           0 :     Py_DECREF(ob);
   31865             :     return ptr;
   31866           0 : bad:
   31867           0 :     Py_XDECREF(ob);
   31868           0 :     return NULL;
   31869             : }
   31870             : 
   31871             : /* MergeVTables */
   31872             : #if !CYTHON_COMPILING_IN_LIMITED_API
   31873           9 : static int __Pyx_MergeVtables(PyTypeObject *type) {
   31874           9 :     int i;
   31875           9 :     void** base_vtables;
   31876           9 :     __Pyx_TypeName tp_base_name;
   31877           9 :     __Pyx_TypeName base_name;
   31878           9 :     void* unknown = (void*)-1;
   31879           9 :     PyObject* bases = type->tp_bases;
   31880           9 :     int base_depth = 0;
   31881             :     {
   31882           9 :         PyTypeObject* base = type->tp_base;
   31883          21 :         while (base) {
   31884          12 :             base_depth += 1;
   31885          12 :             base = base->tp_base;
   31886             :         }
   31887             :     }
   31888           9 :     base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1));
   31889           9 :     base_vtables[0] = unknown;
   31890           9 :     for (i = 1; i < PyTuple_GET_SIZE(bases); i++) {
   31891           0 :         void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i)));
   31892           0 :         if (base_vtable != NULL) {
   31893           0 :             int j;
   31894           0 :             PyTypeObject* base = type->tp_base;
   31895           0 :             for (j = 0; j < base_depth; j++) {
   31896           0 :                 if (base_vtables[j] == unknown) {
   31897           0 :                     base_vtables[j] = __Pyx_GetVtable(base);
   31898           0 :                     base_vtables[j + 1] = unknown;
   31899             :                 }
   31900           0 :                 if (base_vtables[j] == base_vtable) {
   31901             :                     break;
   31902           0 :                 } else if (base_vtables[j] == NULL) {
   31903           0 :                     goto bad;
   31904             :                 }
   31905           0 :                 base = base->tp_base;
   31906             :             }
   31907             :         }
   31908             :     }
   31909           9 :     PyErr_Clear();
   31910           9 :     free(base_vtables);
   31911           9 :     return 0;
   31912           0 : bad:
   31913           0 :     tp_base_name = __Pyx_PyType_GetName(type->tp_base);
   31914           0 :     base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i));
   31915           0 :     PyErr_Format(PyExc_TypeError,
   31916             :         "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name);
   31917           0 :     __Pyx_DECREF_TypeName(tp_base_name);
   31918           0 :     __Pyx_DECREF_TypeName(base_name);
   31919           0 :     free(base_vtables);
   31920           0 :     return -1;
   31921             : }
   31922             : #endif
   31923             : 
   31924             : /* SetupReduce */
   31925             : #if !CYTHON_COMPILING_IN_LIMITED_API
   31926           6 : static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
   31927           6 :   int ret;
   31928           6 :   PyObject *name_attr;
   31929           6 :   name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name_2);
   31930           6 :   if (likely(name_attr)) {
   31931           6 :       ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
   31932             :   } else {
   31933             :       ret = -1;
   31934             :   }
   31935           6 :   if (unlikely(ret < 0)) {
   31936           0 :       PyErr_Clear();
   31937           0 :       ret = 0;
   31938             :   }
   31939           6 :   Py_XDECREF(name_attr);
   31940           6 :   return ret;
   31941             : }
   31942          12 : static int __Pyx_setup_reduce(PyObject* type_obj) {
   31943          12 :     int ret = 0;
   31944          12 :     PyObject *object_reduce = NULL;
   31945          12 :     PyObject *object_getstate = NULL;
   31946          12 :     PyObject *object_reduce_ex = NULL;
   31947          12 :     PyObject *reduce = NULL;
   31948          12 :     PyObject *reduce_ex = NULL;
   31949          12 :     PyObject *reduce_cython = NULL;
   31950          12 :     PyObject *setstate = NULL;
   31951          12 :     PyObject *setstate_cython = NULL;
   31952          12 :     PyObject *getstate = NULL;
   31953             : #if CYTHON_USE_PYTYPE_LOOKUP
   31954          12 :     getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
   31955             : #else
   31956             :     getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
   31957             :     if (!getstate && PyErr_Occurred()) {
   31958             :         goto __PYX_BAD;
   31959             :     }
   31960             : #endif
   31961          12 :     if (getstate) {
   31962             : #if CYTHON_USE_PYTYPE_LOOKUP
   31963          12 :         object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
   31964             : #else
   31965             :         object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
   31966             :         if (!object_getstate && PyErr_Occurred()) {
   31967             :             goto __PYX_BAD;
   31968             :         }
   31969             : #endif
   31970          12 :         if (object_getstate != getstate) {
   31971           0 :             goto __PYX_GOOD;
   31972             :         }
   31973             :     }
   31974             : #if CYTHON_USE_PYTYPE_LOOKUP
   31975          12 :     object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
   31976             : #else
   31977             :     object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
   31978             : #endif
   31979          12 :     reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
   31980          12 :     if (reduce_ex == object_reduce_ex) {
   31981             : #if CYTHON_USE_PYTYPE_LOOKUP
   31982          12 :         object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
   31983             : #else
   31984             :         object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
   31985             : #endif
   31986          12 :         reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
   31987          12 :         if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
   31988          12 :             reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
   31989          12 :             if (likely(reduce_cython)) {
   31990          12 :                 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
   31991          12 :                 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
   31992           0 :             } else if (reduce == object_reduce || PyErr_Occurred()) {
   31993           0 :                 goto __PYX_BAD;
   31994             :             }
   31995          12 :             setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate);
   31996          12 :             if (!setstate) PyErr_Clear();
   31997          12 :             if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
   31998          12 :                 setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
   31999          12 :                 if (likely(setstate_cython)) {
   32000          12 :                     ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
   32001          12 :                     ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
   32002           0 :                 } else if (!setstate || PyErr_Occurred()) {
   32003           0 :                     goto __PYX_BAD;
   32004             :                 }
   32005             :             }
   32006          12 :             PyType_Modified((PyTypeObject*)type_obj);
   32007             :         }
   32008             :     }
   32009          12 :     goto __PYX_GOOD;
   32010           0 : __PYX_BAD:
   32011           0 :     if (!PyErr_Occurred()) {
   32012           0 :         __Pyx_TypeName type_obj_name =
   32013             :             __Pyx_PyType_GetName((PyTypeObject*)type_obj);
   32014           0 :         PyErr_Format(PyExc_RuntimeError,
   32015             :             "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
   32016             :         __Pyx_DECREF_TypeName(type_obj_name);
   32017             :     }
   32018             :     ret = -1;
   32019          12 : __PYX_GOOD:
   32020             : #if !CYTHON_USE_PYTYPE_LOOKUP
   32021             :     Py_XDECREF(object_reduce);
   32022             :     Py_XDECREF(object_reduce_ex);
   32023             :     Py_XDECREF(object_getstate);
   32024             :     Py_XDECREF(getstate);
   32025             : #endif
   32026          12 :     Py_XDECREF(reduce);
   32027          12 :     Py_XDECREF(reduce_ex);
   32028          12 :     Py_XDECREF(reduce_cython);
   32029          12 :     Py_XDECREF(setstate);
   32030          12 :     Py_XDECREF(setstate_cython);
   32031          12 :     return ret;
   32032             : }
   32033             : #endif
   32034             : 
   32035             : /* TypeImport */
   32036             : #ifndef __PYX_HAVE_RT_ImportType_3_0_11
   32037             : #define __PYX_HAVE_RT_ImportType_3_0_11
   32038          48 : static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject *module, const char *module_name, const char *class_name,
   32039             :     size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size)
   32040             : {
   32041          48 :     PyObject *result = 0;
   32042          48 :     char warning[200];
   32043          48 :     Py_ssize_t basicsize;
   32044          48 :     Py_ssize_t itemsize;
   32045             : #if CYTHON_COMPILING_IN_LIMITED_API
   32046             :     PyObject *py_basicsize;
   32047             :     PyObject *py_itemsize;
   32048             : #endif
   32049          48 :     result = PyObject_GetAttrString(module, class_name);
   32050          48 :     if (!result)
   32051           0 :         goto bad;
   32052          48 :     if (!PyType_Check(result)) {
   32053           0 :         PyErr_Format(PyExc_TypeError,
   32054             :             "%.200s.%.200s is not a type object",
   32055             :             module_name, class_name);
   32056           0 :         goto bad;
   32057             :     }
   32058             : #if !CYTHON_COMPILING_IN_LIMITED_API
   32059          48 :     basicsize = ((PyTypeObject *)result)->tp_basicsize;
   32060          48 :     itemsize = ((PyTypeObject *)result)->tp_itemsize;
   32061             : #else
   32062             :     py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
   32063             :     if (!py_basicsize)
   32064             :         goto bad;
   32065             :     basicsize = PyLong_AsSsize_t(py_basicsize);
   32066             :     Py_DECREF(py_basicsize);
   32067             :     py_basicsize = 0;
   32068             :     if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
   32069             :         goto bad;
   32070             :     py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
   32071             :     if (!py_itemsize)
   32072             :         goto bad;
   32073             :     itemsize = PyLong_AsSsize_t(py_itemsize);
   32074             :     Py_DECREF(py_itemsize);
   32075             :     py_itemsize = 0;
   32076             :     if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
   32077             :         goto bad;
   32078             : #endif
   32079          48 :     if (itemsize) {
   32080           3 :         if (size % alignment) {
   32081           0 :             alignment = size % alignment;
   32082             :         }
   32083           3 :         if (itemsize < (Py_ssize_t)alignment)
   32084             :             itemsize = (Py_ssize_t)alignment;
   32085             :     }
   32086          48 :     if ((size_t)(basicsize + itemsize) < size) {
   32087           0 :         PyErr_Format(PyExc_ValueError,
   32088             :             "%.200s.%.200s size changed, may indicate binary incompatibility. "
   32089             :             "Expected %zd from C header, got %zd from PyObject",
   32090             :             module_name, class_name, size, basicsize+itemsize);
   32091           0 :         goto bad;
   32092             :     }
   32093          48 :     if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_11 &&
   32094           0 :             ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
   32095           0 :         PyErr_Format(PyExc_ValueError,
   32096             :             "%.200s.%.200s size changed, may indicate binary incompatibility. "
   32097             :             "Expected %zd from C header, got %zd-%zd from PyObject",
   32098             :             module_name, class_name, size, basicsize, basicsize+itemsize);
   32099           0 :         goto bad;
   32100             :     }
   32101          48 :     else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_11 && (size_t)basicsize > size) {
   32102           0 :         PyOS_snprintf(warning, sizeof(warning),
   32103             :             "%s.%s size changed, may indicate binary incompatibility. "
   32104             :             "Expected %zd from C header, got %zd from PyObject",
   32105             :             module_name, class_name, size, basicsize);
   32106           0 :         if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
   32107             :     }
   32108             :     return (PyTypeObject *)result;
   32109           0 : bad:
   32110           0 :     Py_XDECREF(result);
   32111           0 :     return NULL;
   32112             : }
   32113             : #endif
   32114             : 
   32115             : /* FetchSharedCythonModule */
   32116           3 : static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
   32117           3 :     return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME);
   32118             : }
   32119             : 
   32120             : /* FetchCommonType */
   32121           3 : static int __Pyx_VerifyCachedType(PyObject *cached_type,
   32122             :                                const char *name,
   32123             :                                Py_ssize_t basicsize,
   32124             :                                Py_ssize_t expected_basicsize) {
   32125           3 :     if (!PyType_Check(cached_type)) {
   32126           0 :         PyErr_Format(PyExc_TypeError,
   32127             :             "Shared Cython type %.200s is not a type object", name);
   32128           0 :         return -1;
   32129             :     }
   32130           3 :     if (basicsize != expected_basicsize) {
   32131           0 :         PyErr_Format(PyExc_TypeError,
   32132             :             "Shared Cython type %.200s has the wrong size, try recompiling",
   32133             :             name);
   32134           0 :         return -1;
   32135             :     }
   32136             :     return 0;
   32137             : }
   32138             : #if !CYTHON_USE_TYPE_SPECS
   32139           3 : static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
   32140           3 :     PyObject* abi_module;
   32141           3 :     const char* object_name;
   32142           3 :     PyTypeObject *cached_type = NULL;
   32143           3 :     abi_module = __Pyx_FetchSharedCythonABIModule();
   32144           3 :     if (!abi_module) return NULL;
   32145           3 :     object_name = strrchr(type->tp_name, '.');
   32146           3 :     object_name = object_name ? object_name+1 : type->tp_name;
   32147           3 :     cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name);
   32148           3 :     if (cached_type) {
   32149           3 :         if (__Pyx_VerifyCachedType(
   32150             :               (PyObject *)cached_type,
   32151             :               object_name,
   32152             :               cached_type->tp_basicsize,
   32153             :               type->tp_basicsize) < 0) {
   32154           0 :             goto bad;
   32155             :         }
   32156           3 :         goto done;
   32157             :     }
   32158           0 :     if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
   32159           0 :     PyErr_Clear();
   32160           0 :     if (PyType_Ready(type) < 0) goto bad;
   32161           0 :     if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0)
   32162           0 :         goto bad;
   32163           0 :     Py_INCREF(type);
   32164             :     cached_type = type;
   32165           3 : done:
   32166           3 :     Py_DECREF(abi_module);
   32167             :     return cached_type;
   32168           0 : bad:
   32169           0 :     Py_XDECREF(cached_type);
   32170           0 :     cached_type = NULL;
   32171           0 :     goto done;
   32172             : }
   32173             : #else
   32174             : static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
   32175             :     PyObject *abi_module, *cached_type = NULL;
   32176             :     const char* object_name = strrchr(spec->name, '.');
   32177             :     object_name = object_name ? object_name+1 : spec->name;
   32178             :     abi_module = __Pyx_FetchSharedCythonABIModule();
   32179             :     if (!abi_module) return NULL;
   32180             :     cached_type = PyObject_GetAttrString(abi_module, object_name);
   32181             :     if (cached_type) {
   32182             :         Py_ssize_t basicsize;
   32183             : #if CYTHON_COMPILING_IN_LIMITED_API
   32184             :         PyObject *py_basicsize;
   32185             :         py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
   32186             :         if (unlikely(!py_basicsize)) goto bad;
   32187             :         basicsize = PyLong_AsSsize_t(py_basicsize);
   32188             :         Py_DECREF(py_basicsize);
   32189             :         py_basicsize = 0;
   32190             :         if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
   32191             : #else
   32192             :         basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1;
   32193             : #endif
   32194             :         if (__Pyx_VerifyCachedType(
   32195             :               cached_type,
   32196             :               object_name,
   32197             :               basicsize,
   32198             :               spec->basicsize) < 0) {
   32199             :             goto bad;
   32200             :         }
   32201             :         goto done;
   32202             :     }
   32203             :     if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
   32204             :     PyErr_Clear();
   32205             :     CYTHON_UNUSED_VAR(module);
   32206             :     cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases);
   32207             :     if (unlikely(!cached_type)) goto bad;
   32208             :     if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
   32209             :     if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad;
   32210             : done:
   32211             :     Py_DECREF(abi_module);
   32212             :     assert(cached_type == NULL || PyType_Check(cached_type));
   32213             :     return (PyTypeObject *) cached_type;
   32214             : bad:
   32215             :     Py_XDECREF(cached_type);
   32216             :     cached_type = NULL;
   32217             :     goto done;
   32218             : }
   32219             : #endif
   32220             : 
   32221             : /* PyVectorcallFastCallDict */
   32222             : #if CYTHON_METH_FASTCALL
   32223           0 : static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
   32224             : {
   32225           0 :     PyObject *res = NULL;
   32226           0 :     PyObject *kwnames;
   32227           0 :     PyObject **newargs;
   32228           0 :     PyObject **kwvalues;
   32229           0 :     Py_ssize_t i, pos;
   32230           0 :     size_t j;
   32231           0 :     PyObject *key, *value;
   32232           0 :     unsigned long keys_are_strings;
   32233           0 :     Py_ssize_t nkw = PyDict_GET_SIZE(kw);
   32234           0 :     newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
   32235           0 :     if (unlikely(newargs == NULL)) {
   32236           0 :         PyErr_NoMemory();
   32237           0 :         return NULL;
   32238             :     }
   32239           0 :     for (j = 0; j < nargs; j++) newargs[j] = args[j];
   32240           0 :     kwnames = PyTuple_New(nkw);
   32241           0 :     if (unlikely(kwnames == NULL)) {
   32242           0 :         PyMem_Free(newargs);
   32243           0 :         return NULL;
   32244             :     }
   32245           0 :     kwvalues = newargs + nargs;
   32246           0 :     pos = i = 0;
   32247           0 :     keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
   32248           0 :     while (PyDict_Next(kw, &pos, &key, &value)) {
   32249           0 :         keys_are_strings &= Py_TYPE(key)->tp_flags;
   32250           0 :         Py_INCREF(key);
   32251           0 :         Py_INCREF(value);
   32252           0 :         PyTuple_SET_ITEM(kwnames, i, key);
   32253           0 :         kwvalues[i] = value;
   32254           0 :         i++;
   32255             :     }
   32256           0 :     if (unlikely(!keys_are_strings)) {
   32257           0 :         PyErr_SetString(PyExc_TypeError, "keywords must be strings");
   32258           0 :         goto cleanup;
   32259             :     }
   32260           0 :     res = vc(func, newargs, nargs, kwnames);
   32261           0 : cleanup:
   32262           0 :     Py_DECREF(kwnames);
   32263           0 :     for (i = 0; i < nkw; i++)
   32264           0 :         Py_DECREF(kwvalues[i]);
   32265           0 :     PyMem_Free(newargs);
   32266           0 :     return res;
   32267             : }
   32268           0 : static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
   32269             : {
   32270           0 :     if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) {
   32271           0 :         return vc(func, args, nargs, NULL);
   32272             :     }
   32273           0 :     return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
   32274             : }
   32275             : #endif
   32276             : 
   32277             : /* CythonFunctionShared */
   32278             : #if CYTHON_COMPILING_IN_LIMITED_API
   32279             : static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
   32280             :     if (__Pyx_CyFunction_Check(func)) {
   32281             :         return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
   32282             :     } else if (PyCFunction_Check(func)) {
   32283             :         return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
   32284             :     }
   32285             :     return 0;
   32286             : }
   32287             : #else
   32288             : static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
   32289             :     return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
   32290             : }
   32291             : #endif
   32292             : static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
   32293             : #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
   32294             :     __Pyx_Py_XDECREF_SET(
   32295             :         __Pyx_CyFunction_GetClassObj(f),
   32296             :             ((classobj) ? __Pyx_NewRef(classobj) : NULL));
   32297             : #else
   32298             :     __Pyx_Py_XDECREF_SET(
   32299             :         ((PyCMethodObject *) (f))->mm_class,
   32300             :         (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
   32301             : #endif
   32302             : }
   32303             : static PyObject *
   32304           0 : __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure)
   32305             : {
   32306           0 :     CYTHON_UNUSED_VAR(closure);
   32307           0 :     if (unlikely(op->func_doc == NULL)) {
   32308             : #if CYTHON_COMPILING_IN_LIMITED_API
   32309             :         op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
   32310             :         if (unlikely(!op->func_doc)) return NULL;
   32311             : #else
   32312           0 :         if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
   32313             : #if PY_MAJOR_VERSION >= 3
   32314           0 :             op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
   32315             : #else
   32316             :             op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
   32317             : #endif
   32318           0 :             if (unlikely(op->func_doc == NULL))
   32319             :                 return NULL;
   32320             :         } else {
   32321           0 :             Py_INCREF(Py_None);
   32322           0 :             return Py_None;
   32323             :         }
   32324             : #endif
   32325             :     }
   32326           0 :     Py_INCREF(op->func_doc);
   32327             :     return op->func_doc;
   32328             : }
   32329             : static int
   32330           0 : __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
   32331             : {
   32332           0 :     CYTHON_UNUSED_VAR(context);
   32333           0 :     if (value == NULL) {
   32334           0 :         value = Py_None;
   32335             :     }
   32336           0 :     Py_INCREF(value);
   32337           0 :     __Pyx_Py_XDECREF_SET(op->func_doc, value);
   32338           0 :     return 0;
   32339             : }
   32340             : static PyObject *
   32341           0 : __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
   32342             : {
   32343           0 :     CYTHON_UNUSED_VAR(context);
   32344           0 :     if (unlikely(op->func_name == NULL)) {
   32345             : #if CYTHON_COMPILING_IN_LIMITED_API
   32346             :         op->func_name = PyObject_GetAttrString(op->func, "__name__");
   32347             : #elif PY_MAJOR_VERSION >= 3
   32348           0 :         op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
   32349             : #else
   32350             :         op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
   32351             : #endif
   32352           0 :         if (unlikely(op->func_name == NULL))
   32353             :             return NULL;
   32354             :     }
   32355           0 :     Py_INCREF(op->func_name);
   32356             :     return op->func_name;
   32357             : }
   32358             : static int
   32359           0 : __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
   32360             : {
   32361           0 :     CYTHON_UNUSED_VAR(context);
   32362             : #if PY_MAJOR_VERSION >= 3
   32363           0 :     if (unlikely(value == NULL || !PyUnicode_Check(value)))
   32364             : #else
   32365             :     if (unlikely(value == NULL || !PyString_Check(value)))
   32366             : #endif
   32367             :     {
   32368           0 :         PyErr_SetString(PyExc_TypeError,
   32369             :                         "__name__ must be set to a string object");
   32370           0 :         return -1;
   32371             :     }
   32372           0 :     Py_INCREF(value);
   32373           0 :     __Pyx_Py_XDECREF_SET(op->func_name, value);
   32374           0 :     return 0;
   32375             : }
   32376             : static PyObject *
   32377           0 : __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
   32378             : {
   32379           0 :     CYTHON_UNUSED_VAR(context);
   32380           0 :     Py_INCREF(op->func_qualname);
   32381           0 :     return op->func_qualname;
   32382             : }
   32383             : static int
   32384           0 : __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
   32385             : {
   32386           0 :     CYTHON_UNUSED_VAR(context);
   32387             : #if PY_MAJOR_VERSION >= 3
   32388           0 :     if (unlikely(value == NULL || !PyUnicode_Check(value)))
   32389             : #else
   32390             :     if (unlikely(value == NULL || !PyString_Check(value)))
   32391             : #endif
   32392             :     {
   32393           0 :         PyErr_SetString(PyExc_TypeError,
   32394             :                         "__qualname__ must be set to a string object");
   32395           0 :         return -1;
   32396             :     }
   32397           0 :     Py_INCREF(value);
   32398           0 :     __Pyx_Py_XDECREF_SET(op->func_qualname, value);
   32399           0 :     return 0;
   32400             : }
   32401             : static PyObject *
   32402           0 : __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
   32403             : {
   32404           0 :     CYTHON_UNUSED_VAR(context);
   32405           0 :     if (unlikely(op->func_dict == NULL)) {
   32406           0 :         op->func_dict = PyDict_New();
   32407           0 :         if (unlikely(op->func_dict == NULL))
   32408             :             return NULL;
   32409             :     }
   32410           0 :     Py_INCREF(op->func_dict);
   32411             :     return op->func_dict;
   32412             : }
   32413             : static int
   32414           0 : __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context)
   32415             : {
   32416           0 :     CYTHON_UNUSED_VAR(context);
   32417           0 :     if (unlikely(value == NULL)) {
   32418           0 :         PyErr_SetString(PyExc_TypeError,
   32419             :                "function's dictionary may not be deleted");
   32420           0 :         return -1;
   32421             :     }
   32422           0 :     if (unlikely(!PyDict_Check(value))) {
   32423           0 :         PyErr_SetString(PyExc_TypeError,
   32424             :                "setting function's dictionary to a non-dict");
   32425           0 :         return -1;
   32426             :     }
   32427           0 :     Py_INCREF(value);
   32428           0 :     __Pyx_Py_XDECREF_SET(op->func_dict, value);
   32429           0 :     return 0;
   32430             : }
   32431             : static PyObject *
   32432           0 : __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
   32433             : {
   32434           0 :     CYTHON_UNUSED_VAR(context);
   32435           0 :     Py_INCREF(op->func_globals);
   32436           0 :     return op->func_globals;
   32437             : }
   32438             : static PyObject *
   32439           0 : __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
   32440             : {
   32441           0 :     CYTHON_UNUSED_VAR(op);
   32442           0 :     CYTHON_UNUSED_VAR(context);
   32443           0 :     Py_INCREF(Py_None);
   32444           0 :     return Py_None;
   32445             : }
   32446             : static PyObject *
   32447           0 : __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
   32448             : {
   32449           0 :     PyObject* result = (op->func_code) ? op->func_code : Py_None;
   32450           0 :     CYTHON_UNUSED_VAR(context);
   32451           0 :     Py_INCREF(result);
   32452           0 :     return result;
   32453             : }
   32454             : static int
   32455           0 : __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
   32456           0 :     int result = 0;
   32457           0 :     PyObject *res = op->defaults_getter((PyObject *) op);
   32458           0 :     if (unlikely(!res))
   32459             :         return -1;
   32460             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   32461           0 :     op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
   32462           0 :     Py_INCREF(op->defaults_tuple);
   32463           0 :     op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
   32464           0 :     Py_INCREF(op->defaults_kwdict);
   32465             :     #else
   32466             :     op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
   32467             :     if (unlikely(!op->defaults_tuple)) result = -1;
   32468             :     else {
   32469             :         op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
   32470             :         if (unlikely(!op->defaults_kwdict)) result = -1;
   32471             :     }
   32472             :     #endif
   32473           0 :     Py_DECREF(res);
   32474             :     return result;
   32475             : }
   32476             : static int
   32477           0 : __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
   32478           0 :     CYTHON_UNUSED_VAR(context);
   32479           0 :     if (!value) {
   32480             :         value = Py_None;
   32481           0 :     } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
   32482           0 :         PyErr_SetString(PyExc_TypeError,
   32483             :                         "__defaults__ must be set to a tuple object");
   32484           0 :         return -1;
   32485             :     }
   32486           0 :     PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
   32487             :                  "currently affect the values used in function calls", 1);
   32488           0 :     Py_INCREF(value);
   32489           0 :     __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
   32490           0 :     return 0;
   32491             : }
   32492             : static PyObject *
   32493           0 : __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
   32494           0 :     PyObject* result = op->defaults_tuple;
   32495           0 :     CYTHON_UNUSED_VAR(context);
   32496           0 :     if (unlikely(!result)) {
   32497           0 :         if (op->defaults_getter) {
   32498           0 :             if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
   32499           0 :             result = op->defaults_tuple;
   32500             :         } else {
   32501             :             result = Py_None;
   32502             :         }
   32503             :     }
   32504           0 :     Py_INCREF(result);
   32505             :     return result;
   32506             : }
   32507             : static int
   32508           0 : __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
   32509           0 :     CYTHON_UNUSED_VAR(context);
   32510           0 :     if (!value) {
   32511             :         value = Py_None;
   32512           0 :     } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
   32513           0 :         PyErr_SetString(PyExc_TypeError,
   32514             :                         "__kwdefaults__ must be set to a dict object");
   32515           0 :         return -1;
   32516             :     }
   32517           0 :     PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
   32518             :                  "currently affect the values used in function calls", 1);
   32519           0 :     Py_INCREF(value);
   32520           0 :     __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
   32521           0 :     return 0;
   32522             : }
   32523             : static PyObject *
   32524           0 : __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
   32525           0 :     PyObject* result = op->defaults_kwdict;
   32526           0 :     CYTHON_UNUSED_VAR(context);
   32527           0 :     if (unlikely(!result)) {
   32528           0 :         if (op->defaults_getter) {
   32529           0 :             if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
   32530           0 :             result = op->defaults_kwdict;
   32531             :         } else {
   32532             :             result = Py_None;
   32533             :         }
   32534             :     }
   32535           0 :     Py_INCREF(result);
   32536             :     return result;
   32537             : }
   32538             : static int
   32539           0 : __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
   32540           0 :     CYTHON_UNUSED_VAR(context);
   32541           0 :     if (!value || value == Py_None) {
   32542             :         value = NULL;
   32543           0 :     } else if (unlikely(!PyDict_Check(value))) {
   32544           0 :         PyErr_SetString(PyExc_TypeError,
   32545             :                         "__annotations__ must be set to a dict object");
   32546           0 :         return -1;
   32547             :     }
   32548           0 :     Py_XINCREF(value);
   32549           0 :     __Pyx_Py_XDECREF_SET(op->func_annotations, value);
   32550           0 :     return 0;
   32551             : }
   32552             : static PyObject *
   32553           0 : __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
   32554           0 :     PyObject* result = op->func_annotations;
   32555           0 :     CYTHON_UNUSED_VAR(context);
   32556           0 :     if (unlikely(!result)) {
   32557           0 :         result = PyDict_New();
   32558           0 :         if (unlikely(!result)) return NULL;
   32559           0 :         op->func_annotations = result;
   32560             :     }
   32561           0 :     Py_INCREF(result);
   32562             :     return result;
   32563             : }
   32564             : static PyObject *
   32565           0 : __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
   32566           0 :     int is_coroutine;
   32567           0 :     CYTHON_UNUSED_VAR(context);
   32568           0 :     if (op->func_is_coroutine) {
   32569           0 :         return __Pyx_NewRef(op->func_is_coroutine);
   32570             :     }
   32571           0 :     is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
   32572             : #if PY_VERSION_HEX >= 0x03050000
   32573           0 :     if (is_coroutine) {
   32574           0 :         PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine;
   32575           0 :         fromlist = PyList_New(1);
   32576           0 :         if (unlikely(!fromlist)) return NULL;
   32577           0 :         Py_INCREF(marker);
   32578             : #if CYTHON_ASSUME_SAFE_MACROS
   32579           0 :         PyList_SET_ITEM(fromlist, 0, marker);
   32580             : #else
   32581             :         if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
   32582             :             Py_DECREF(marker);
   32583             :             Py_DECREF(fromlist);
   32584             :             return NULL;
   32585             :         }
   32586             : #endif
   32587           0 :         module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0);
   32588           0 :         Py_DECREF(fromlist);
   32589           0 :         if (unlikely(!module)) goto ignore;
   32590           0 :         op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker);
   32591           0 :         Py_DECREF(module);
   32592           0 :         if (likely(op->func_is_coroutine)) {
   32593           0 :             return __Pyx_NewRef(op->func_is_coroutine);
   32594             :         }
   32595           0 : ignore:
   32596           0 :         PyErr_Clear();
   32597             :     }
   32598             : #endif
   32599           0 :     op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine);
   32600           0 :     return __Pyx_NewRef(op->func_is_coroutine);
   32601             : }
   32602             : #if CYTHON_COMPILING_IN_LIMITED_API
   32603             : static PyObject *
   32604             : __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
   32605             :     CYTHON_UNUSED_VAR(context);
   32606             :     return PyObject_GetAttrString(op->func, "__module__");
   32607             : }
   32608             : static int
   32609             : __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
   32610             :     CYTHON_UNUSED_VAR(context);
   32611             :     return PyObject_SetAttrString(op->func, "__module__", value);
   32612             : }
   32613             : #endif
   32614             : static PyGetSetDef __pyx_CyFunction_getsets[] = {
   32615             :     {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
   32616             :     {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
   32617             :     {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
   32618             :     {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
   32619             :     {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
   32620             :     {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
   32621             :     {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
   32622             :     {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
   32623             :     {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
   32624             :     {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
   32625             :     {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
   32626             :     {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
   32627             :     {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
   32628             :     {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
   32629             :     {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
   32630             :     {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
   32631             :     {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
   32632             :     {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
   32633             : #if CYTHON_COMPILING_IN_LIMITED_API
   32634             :     {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
   32635             : #endif
   32636             :     {0, 0, 0, 0, 0}
   32637             : };
   32638             : static PyMemberDef __pyx_CyFunction_members[] = {
   32639             : #if !CYTHON_COMPILING_IN_LIMITED_API
   32640             :     {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
   32641             : #endif
   32642             : #if CYTHON_USE_TYPE_SPECS
   32643             :     {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
   32644             : #if CYTHON_METH_FASTCALL
   32645             : #if CYTHON_BACKPORT_VECTORCALL
   32646             :     {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
   32647             : #else
   32648             : #if !CYTHON_COMPILING_IN_LIMITED_API
   32649             :     {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
   32650             : #endif
   32651             : #endif
   32652             : #endif
   32653             : #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
   32654             :     {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
   32655             : #else
   32656             :     {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
   32657             : #endif
   32658             : #endif
   32659             :     {0, 0, 0,  0, 0}
   32660             : };
   32661             : static PyObject *
   32662           0 : __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
   32663             : {
   32664           0 :     CYTHON_UNUSED_VAR(args);
   32665             : #if PY_MAJOR_VERSION >= 3
   32666           0 :     Py_INCREF(m->func_qualname);
   32667           0 :     return m->func_qualname;
   32668             : #else
   32669             :     return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name);
   32670             : #endif
   32671             : }
   32672             : static PyMethodDef __pyx_CyFunction_methods[] = {
   32673             :     {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
   32674             :     {0, 0, 0, 0}
   32675             : };
   32676             : #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
   32677             : #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
   32678             : #else
   32679             : #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
   32680             : #endif
   32681           6 : static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
   32682             :                                        PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
   32683             : #if !CYTHON_COMPILING_IN_LIMITED_API
   32684           6 :     PyCFunctionObject *cf = (PyCFunctionObject*) op;
   32685             : #endif
   32686           6 :     if (unlikely(op == NULL))
   32687             :         return NULL;
   32688             : #if CYTHON_COMPILING_IN_LIMITED_API
   32689             :     op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
   32690             :     if (unlikely(!op->func)) return NULL;
   32691             : #endif
   32692           6 :     op->flags = flags;
   32693           6 :     __Pyx_CyFunction_weakreflist(op) = NULL;
   32694             : #if !CYTHON_COMPILING_IN_LIMITED_API
   32695           6 :     cf->m_ml = ml;
   32696           6 :     cf->m_self = (PyObject *) op;
   32697             : #endif
   32698           6 :     Py_XINCREF(closure);
   32699           6 :     op->func_closure = closure;
   32700             : #if !CYTHON_COMPILING_IN_LIMITED_API
   32701           6 :     Py_XINCREF(module);
   32702           6 :     cf->m_module = module;
   32703             : #endif
   32704           6 :     op->func_dict = NULL;
   32705           6 :     op->func_name = NULL;
   32706           6 :     Py_INCREF(qualname);
   32707           6 :     op->func_qualname = qualname;
   32708           6 :     op->func_doc = NULL;
   32709             : #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
   32710             :     op->func_classobj = NULL;
   32711             : #else
   32712           6 :     ((PyCMethodObject*)op)->mm_class = NULL;
   32713             : #endif
   32714           6 :     op->func_globals = globals;
   32715           6 :     Py_INCREF(op->func_globals);
   32716           6 :     Py_XINCREF(code);
   32717           6 :     op->func_code = code;
   32718           6 :     op->defaults_pyobjects = 0;
   32719           6 :     op->defaults_size = 0;
   32720           6 :     op->defaults = NULL;
   32721           6 :     op->defaults_tuple = NULL;
   32722           6 :     op->defaults_kwdict = NULL;
   32723           6 :     op->defaults_getter = NULL;
   32724           6 :     op->func_annotations = NULL;
   32725           6 :     op->func_is_coroutine = NULL;
   32726             : #if CYTHON_METH_FASTCALL
   32727           6 :     switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
   32728           0 :     case METH_NOARGS:
   32729           0 :         __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
   32730           0 :         break;
   32731           0 :     case METH_O:
   32732           0 :         __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
   32733           0 :         break;
   32734           0 :     case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
   32735           0 :         __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
   32736           0 :         break;
   32737           6 :     case METH_FASTCALL | METH_KEYWORDS:
   32738           6 :         __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
   32739           6 :         break;
   32740           0 :     case METH_VARARGS | METH_KEYWORDS:
   32741           0 :         __Pyx_CyFunction_func_vectorcall(op) = NULL;
   32742           0 :         break;
   32743           0 :     default:
   32744           0 :         PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
   32745           0 :         Py_DECREF(op);
   32746             :         return NULL;
   32747             :     }
   32748             : #endif
   32749             :     return (PyObject *) op;
   32750             : }
   32751             : static int
   32752           0 : __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
   32753             : {
   32754           0 :     Py_CLEAR(m->func_closure);
   32755             : #if CYTHON_COMPILING_IN_LIMITED_API
   32756             :     Py_CLEAR(m->func);
   32757             : #else
   32758           0 :     Py_CLEAR(((PyCFunctionObject*)m)->m_module);
   32759             : #endif
   32760           0 :     Py_CLEAR(m->func_dict);
   32761           0 :     Py_CLEAR(m->func_name);
   32762           0 :     Py_CLEAR(m->func_qualname);
   32763           0 :     Py_CLEAR(m->func_doc);
   32764           0 :     Py_CLEAR(m->func_globals);
   32765           0 :     Py_CLEAR(m->func_code);
   32766             : #if !CYTHON_COMPILING_IN_LIMITED_API
   32767             : #if PY_VERSION_HEX < 0x030900B1
   32768             :     Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
   32769             : #else
   32770             :     {
   32771           0 :         PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
   32772           0 :         ((PyCMethodObject *) (m))->mm_class = NULL;
   32773           0 :         Py_XDECREF(cls);
   32774             :     }
   32775             : #endif
   32776             : #endif
   32777           0 :     Py_CLEAR(m->defaults_tuple);
   32778           0 :     Py_CLEAR(m->defaults_kwdict);
   32779           0 :     Py_CLEAR(m->func_annotations);
   32780           0 :     Py_CLEAR(m->func_is_coroutine);
   32781           0 :     if (m->defaults) {
   32782             :         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
   32783             :         int i;
   32784           0 :         for (i = 0; i < m->defaults_pyobjects; i++)
   32785           0 :             Py_XDECREF(pydefaults[i]);
   32786           0 :         PyObject_Free(m->defaults);
   32787           0 :         m->defaults = NULL;
   32788             :     }
   32789           0 :     return 0;
   32790             : }
   32791           0 : static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
   32792             : {
   32793           0 :     if (__Pyx_CyFunction_weakreflist(m) != NULL)
   32794           0 :         PyObject_ClearWeakRefs((PyObject *) m);
   32795           0 :     __Pyx_CyFunction_clear(m);
   32796           0 :     __Pyx_PyHeapTypeObject_GC_Del(m);
   32797           0 : }
   32798           0 : static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
   32799             : {
   32800           0 :     PyObject_GC_UnTrack(m);
   32801           0 :     __Pyx__CyFunction_dealloc(m);
   32802           0 : }
   32803           0 : static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
   32804             : {
   32805           0 :     Py_VISIT(m->func_closure);
   32806             : #if CYTHON_COMPILING_IN_LIMITED_API
   32807             :     Py_VISIT(m->func);
   32808             : #else
   32809           0 :     Py_VISIT(((PyCFunctionObject*)m)->m_module);
   32810             : #endif
   32811           0 :     Py_VISIT(m->func_dict);
   32812           0 :     Py_VISIT(m->func_name);
   32813           0 :     Py_VISIT(m->func_qualname);
   32814           0 :     Py_VISIT(m->func_doc);
   32815           0 :     Py_VISIT(m->func_globals);
   32816           0 :     Py_VISIT(m->func_code);
   32817             : #if !CYTHON_COMPILING_IN_LIMITED_API
   32818           0 :     Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
   32819             : #endif
   32820           0 :     Py_VISIT(m->defaults_tuple);
   32821           0 :     Py_VISIT(m->defaults_kwdict);
   32822           0 :     Py_VISIT(m->func_is_coroutine);
   32823           0 :     if (m->defaults) {
   32824             :         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
   32825             :         int i;
   32826           0 :         for (i = 0; i < m->defaults_pyobjects; i++)
   32827           0 :             Py_VISIT(pydefaults[i]);
   32828             :     }
   32829             :     return 0;
   32830             : }
   32831             : static PyObject*
   32832           0 : __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
   32833             : {
   32834             : #if PY_MAJOR_VERSION >= 3
   32835           0 :     return PyUnicode_FromFormat("<cyfunction %U at %p>",
   32836             :                                 op->func_qualname, (void *)op);
   32837             : #else
   32838             :     return PyString_FromFormat("<cyfunction %s at %p>",
   32839             :                                PyString_AsString(op->func_qualname), (void *)op);
   32840             : #endif
   32841             : }
   32842           0 : static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
   32843             : #if CYTHON_COMPILING_IN_LIMITED_API
   32844             :     PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
   32845             :     PyObject *py_name = NULL;
   32846             :     PyCFunction meth;
   32847             :     int flags;
   32848             :     meth = PyCFunction_GetFunction(f);
   32849             :     if (unlikely(!meth)) return NULL;
   32850             :     flags = PyCFunction_GetFlags(f);
   32851             :     if (unlikely(flags < 0)) return NULL;
   32852             : #else
   32853           0 :     PyCFunctionObject* f = (PyCFunctionObject*)func;
   32854           0 :     PyCFunction meth = f->m_ml->ml_meth;
   32855           0 :     int flags = f->m_ml->ml_flags;
   32856             : #endif
   32857           0 :     Py_ssize_t size;
   32858           0 :     switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
   32859           0 :     case METH_VARARGS:
   32860           0 :         if (likely(kw == NULL || PyDict_Size(kw) == 0))
   32861           0 :             return (*meth)(self, arg);
   32862             :         break;
   32863           0 :     case METH_VARARGS | METH_KEYWORDS:
   32864           0 :         return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
   32865           0 :     case METH_NOARGS:
   32866           0 :         if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
   32867             : #if CYTHON_ASSUME_SAFE_MACROS
   32868           0 :             size = PyTuple_GET_SIZE(arg);
   32869             : #else
   32870             :             size = PyTuple_Size(arg);
   32871             :             if (unlikely(size < 0)) return NULL;
   32872             : #endif
   32873           0 :             if (likely(size == 0))
   32874           0 :                 return (*meth)(self, NULL);
   32875             : #if CYTHON_COMPILING_IN_LIMITED_API
   32876             :             py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
   32877             :             if (!py_name) return NULL;
   32878             :             PyErr_Format(PyExc_TypeError,
   32879             :                 "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
   32880             :                 py_name, size);
   32881             :             Py_DECREF(py_name);
   32882             : #else
   32883           0 :             PyErr_Format(PyExc_TypeError,
   32884             :                 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
   32885           0 :                 f->m_ml->ml_name, size);
   32886             : #endif
   32887           0 :             return NULL;
   32888             :         }
   32889             :         break;
   32890           0 :     case METH_O:
   32891           0 :         if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
   32892             : #if CYTHON_ASSUME_SAFE_MACROS
   32893           0 :             size = PyTuple_GET_SIZE(arg);
   32894             : #else
   32895             :             size = PyTuple_Size(arg);
   32896             :             if (unlikely(size < 0)) return NULL;
   32897             : #endif
   32898           0 :             if (likely(size == 1)) {
   32899           0 :                 PyObject *result, *arg0;
   32900             :                 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   32901           0 :                 arg0 = PyTuple_GET_ITEM(arg, 0);
   32902             :                 #else
   32903             :                 arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
   32904             :                 #endif
   32905           0 :                 result = (*meth)(self, arg0);
   32906             :                 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
   32907             :                 Py_DECREF(arg0);
   32908             :                 #endif
   32909           0 :                 return result;
   32910             :             }
   32911             : #if CYTHON_COMPILING_IN_LIMITED_API
   32912             :             py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
   32913             :             if (!py_name) return NULL;
   32914             :             PyErr_Format(PyExc_TypeError,
   32915             :                 "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
   32916             :                 py_name, size);
   32917             :             Py_DECREF(py_name);
   32918             : #else
   32919           0 :             PyErr_Format(PyExc_TypeError,
   32920             :                 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
   32921           0 :                 f->m_ml->ml_name, size);
   32922             : #endif
   32923           0 :             return NULL;
   32924             :         }
   32925             :         break;
   32926           0 :     default:
   32927           0 :         PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
   32928           0 :         return NULL;
   32929             :     }
   32930             : #if CYTHON_COMPILING_IN_LIMITED_API
   32931             :     py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
   32932             :     if (!py_name) return NULL;
   32933             :     PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments",
   32934             :                  py_name);
   32935             :     Py_DECREF(py_name);
   32936             : #else
   32937           0 :     PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
   32938           0 :                  f->m_ml->ml_name);
   32939             : #endif
   32940           0 :     return NULL;
   32941             : }
   32942           0 : static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
   32943           0 :     PyObject *self, *result;
   32944             : #if CYTHON_COMPILING_IN_LIMITED_API
   32945             :     self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
   32946             :     if (unlikely(!self) && PyErr_Occurred()) return NULL;
   32947             : #else
   32948           0 :     self = ((PyCFunctionObject*)func)->m_self;
   32949             : #endif
   32950           0 :     result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
   32951           0 :     return result;
   32952             : }
   32953           0 : static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
   32954           0 :     PyObject *result;
   32955           0 :     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
   32956             : #if CYTHON_METH_FASTCALL
   32957           0 :      __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
   32958           0 :     if (vc) {
   32959             : #if CYTHON_ASSUME_SAFE_MACROS
   32960           0 :         return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
   32961             : #else
   32962             :         (void) &__Pyx_PyVectorcall_FastCallDict;
   32963             :         return PyVectorcall_Call(func, args, kw);
   32964             : #endif
   32965             :     }
   32966             : #endif
   32967           0 :     if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
   32968           0 :         Py_ssize_t argc;
   32969           0 :         PyObject *new_args;
   32970           0 :         PyObject *self;
   32971             : #if CYTHON_ASSUME_SAFE_MACROS
   32972           0 :         argc = PyTuple_GET_SIZE(args);
   32973             : #else
   32974             :         argc = PyTuple_Size(args);
   32975             :         if (unlikely(!argc) < 0) return NULL;
   32976             : #endif
   32977           0 :         new_args = PyTuple_GetSlice(args, 1, argc);
   32978           0 :         if (unlikely(!new_args))
   32979             :             return NULL;
   32980           0 :         self = PyTuple_GetItem(args, 0);
   32981           0 :         if (unlikely(!self)) {
   32982           0 :             Py_DECREF(new_args);
   32983             : #if PY_MAJOR_VERSION > 2
   32984           0 :             PyErr_Format(PyExc_TypeError,
   32985             :                          "unbound method %.200S() needs an argument",
   32986             :                          cyfunc->func_qualname);
   32987             : #else
   32988             :             PyErr_SetString(PyExc_TypeError,
   32989             :                             "unbound method needs an argument");
   32990             : #endif
   32991           0 :             return NULL;
   32992             :         }
   32993           0 :         result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
   32994           0 :         Py_DECREF(new_args);
   32995             :     } else {
   32996           0 :         result = __Pyx_CyFunction_Call(func, args, kw);
   32997             :     }
   32998             :     return result;
   32999             : }
   33000             : #if CYTHON_METH_FASTCALL
   33001         136 : static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
   33002             : {
   33003         136 :     int ret = 0;
   33004         136 :     if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
   33005           0 :         if (unlikely(nargs < 1)) {
   33006           0 :             PyErr_Format(PyExc_TypeError, "%.200s() needs an argument",
   33007           0 :                          ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
   33008           0 :             return -1;
   33009             :         }
   33010             :         ret = 1;
   33011             :     }
   33012         136 :     if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) {
   33013           0 :         PyErr_Format(PyExc_TypeError,
   33014           0 :                      "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
   33015           0 :         return -1;
   33016             :     }
   33017             :     return ret;
   33018             : }
   33019           0 : static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
   33020             : {
   33021           0 :     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
   33022           0 :     PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
   33023             : #if CYTHON_BACKPORT_VECTORCALL
   33024             :     Py_ssize_t nargs = (Py_ssize_t)nargsf;
   33025             : #else
   33026           0 :     Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
   33027             : #endif
   33028           0 :     PyObject *self;
   33029           0 :     switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
   33030           0 :     case 1:
   33031           0 :         self = args[0];
   33032           0 :         args += 1;
   33033           0 :         nargs -= 1;
   33034           0 :         break;
   33035           0 :     case 0:
   33036           0 :         self = ((PyCFunctionObject*)cyfunc)->m_self;
   33037           0 :         break;
   33038             :     default:
   33039             :         return NULL;
   33040             :     }
   33041           0 :     if (unlikely(nargs != 0)) {
   33042           0 :         PyErr_Format(PyExc_TypeError,
   33043             :             "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
   33044             :             def->ml_name, nargs);
   33045           0 :         return NULL;
   33046             :     }
   33047           0 :     return def->ml_meth(self, NULL);
   33048             : }
   33049           0 : static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
   33050             : {
   33051           0 :     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
   33052           0 :     PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
   33053             : #if CYTHON_BACKPORT_VECTORCALL
   33054             :     Py_ssize_t nargs = (Py_ssize_t)nargsf;
   33055             : #else
   33056           0 :     Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
   33057             : #endif
   33058           0 :     PyObject *self;
   33059           0 :     switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
   33060           0 :     case 1:
   33061           0 :         self = args[0];
   33062           0 :         args += 1;
   33063           0 :         nargs -= 1;
   33064           0 :         break;
   33065           0 :     case 0:
   33066           0 :         self = ((PyCFunctionObject*)cyfunc)->m_self;
   33067           0 :         break;
   33068             :     default:
   33069             :         return NULL;
   33070             :     }
   33071           0 :     if (unlikely(nargs != 1)) {
   33072           0 :         PyErr_Format(PyExc_TypeError,
   33073             :             "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
   33074             :             def->ml_name, nargs);
   33075           0 :         return NULL;
   33076             :     }
   33077           0 :     return def->ml_meth(self, args[0]);
   33078             : }
   33079         136 : static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
   33080             : {
   33081         136 :     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
   33082         136 :     PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
   33083             : #if CYTHON_BACKPORT_VECTORCALL
   33084             :     Py_ssize_t nargs = (Py_ssize_t)nargsf;
   33085             : #else
   33086         136 :     Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
   33087             : #endif
   33088         136 :     PyObject *self;
   33089         136 :     switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
   33090           0 :     case 1:
   33091           0 :         self = args[0];
   33092           0 :         args += 1;
   33093           0 :         nargs -= 1;
   33094           0 :         break;
   33095         136 :     case 0:
   33096         136 :         self = ((PyCFunctionObject*)cyfunc)->m_self;
   33097         136 :         break;
   33098             :     default:
   33099             :         return NULL;
   33100             :     }
   33101         136 :     return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
   33102             : }
   33103           0 : static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
   33104             : {
   33105           0 :     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
   33106           0 :     PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
   33107           0 :     PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
   33108             : #if CYTHON_BACKPORT_VECTORCALL
   33109             :     Py_ssize_t nargs = (Py_ssize_t)nargsf;
   33110             : #else
   33111           0 :     Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
   33112             : #endif
   33113           0 :     PyObject *self;
   33114           0 :     switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
   33115           0 :     case 1:
   33116           0 :         self = args[0];
   33117           0 :         args += 1;
   33118           0 :         nargs -= 1;
   33119           0 :         break;
   33120           0 :     case 0:
   33121           0 :         self = ((PyCFunctionObject*)cyfunc)->m_self;
   33122           0 :         break;
   33123             :     default:
   33124             :         return NULL;
   33125             :     }
   33126           0 :     return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames);
   33127             : }
   33128             : #endif
   33129             : #if CYTHON_USE_TYPE_SPECS
   33130             : static PyType_Slot __pyx_CyFunctionType_slots[] = {
   33131             :     {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
   33132             :     {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
   33133             :     {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
   33134             :     {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
   33135             :     {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
   33136             :     {Py_tp_methods, (void *)__pyx_CyFunction_methods},
   33137             :     {Py_tp_members, (void *)__pyx_CyFunction_members},
   33138             :     {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
   33139             :     {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
   33140             :     {0, 0},
   33141             : };
   33142             : static PyType_Spec __pyx_CyFunctionType_spec = {
   33143             :     __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
   33144             :     sizeof(__pyx_CyFunctionObject),
   33145             :     0,
   33146             : #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
   33147             :     Py_TPFLAGS_METHOD_DESCRIPTOR |
   33148             : #endif
   33149             : #if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL)
   33150             :     _Py_TPFLAGS_HAVE_VECTORCALL |
   33151             : #endif
   33152             :     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
   33153             :     __pyx_CyFunctionType_slots
   33154             : };
   33155             : #else
   33156             : static PyTypeObject __pyx_CyFunctionType_type = {
   33157             :     PyVarObject_HEAD_INIT(0, 0)
   33158             :     __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
   33159             :     sizeof(__pyx_CyFunctionObject),
   33160             :     0,
   33161             :     (destructor) __Pyx_CyFunction_dealloc,
   33162             : #if !CYTHON_METH_FASTCALL
   33163             :     0,
   33164             : #elif CYTHON_BACKPORT_VECTORCALL
   33165             :     (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall),
   33166             : #else
   33167             :     offsetof(PyCFunctionObject, vectorcall),
   33168             : #endif
   33169             :     0,
   33170             :     0,
   33171             : #if PY_MAJOR_VERSION < 3
   33172             :     0,
   33173             : #else
   33174             :     0,
   33175             : #endif
   33176             :     (reprfunc) __Pyx_CyFunction_repr,
   33177             :     0,
   33178             :     0,
   33179             :     0,
   33180             :     0,
   33181             :     __Pyx_CyFunction_CallAsMethod,
   33182             :     0,
   33183             :     0,
   33184             :     0,
   33185             :     0,
   33186             : #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
   33187             :     Py_TPFLAGS_METHOD_DESCRIPTOR |
   33188             : #endif
   33189             : #if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL
   33190             :     _Py_TPFLAGS_HAVE_VECTORCALL |
   33191             : #endif
   33192             :     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
   33193             :     0,
   33194             :     (traverseproc) __Pyx_CyFunction_traverse,
   33195             :     (inquiry) __Pyx_CyFunction_clear,
   33196             :     0,
   33197             : #if PY_VERSION_HEX < 0x030500A0
   33198             :     offsetof(__pyx_CyFunctionObject, func_weakreflist),
   33199             : #else
   33200             :     offsetof(PyCFunctionObject, m_weakreflist),
   33201             : #endif
   33202             :     0,
   33203             :     0,
   33204             :     __pyx_CyFunction_methods,
   33205             :     __pyx_CyFunction_members,
   33206             :     __pyx_CyFunction_getsets,
   33207             :     0,
   33208             :     0,
   33209             :     __Pyx_PyMethod_New,
   33210             :     0,
   33211             :     offsetof(__pyx_CyFunctionObject, func_dict),
   33212             :     0,
   33213             :     0,
   33214             :     0,
   33215             :     0,
   33216             :     0,
   33217             :     0,
   33218             :     0,
   33219             :     0,
   33220             :     0,
   33221             :     0,
   33222             :     0,
   33223             :     0,
   33224             : #if PY_VERSION_HEX >= 0x030400a1
   33225             :     0,
   33226             : #endif
   33227             : #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   33228             :     0,
   33229             : #endif
   33230             : #if __PYX_NEED_TP_PRINT_SLOT
   33231             :     0,
   33232             : #endif
   33233             : #if PY_VERSION_HEX >= 0x030C0000
   33234             :     0,
   33235             : #endif
   33236             : #if PY_VERSION_HEX >= 0x030d00A4
   33237             :     0,
   33238             : #endif
   33239             : #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   33240             :     0,
   33241             : #endif
   33242             : };
   33243             : #endif
   33244           3 : static int __pyx_CyFunction_init(PyObject *module) {
   33245             : #if CYTHON_USE_TYPE_SPECS
   33246             :     __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
   33247             : #else
   33248           3 :     CYTHON_UNUSED_VAR(module);
   33249           3 :     __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
   33250             : #endif
   33251           3 :     if (unlikely(__pyx_CyFunctionType == NULL)) {
   33252           0 :         return -1;
   33253             :     }
   33254             :     return 0;
   33255             : }
   33256             : static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
   33257             :     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
   33258             :     m->defaults = PyObject_Malloc(size);
   33259             :     if (unlikely(!m->defaults))
   33260             :         return PyErr_NoMemory();
   33261             :     memset(m->defaults, 0, size);
   33262             :     m->defaults_pyobjects = pyobjects;
   33263             :     m->defaults_size = size;
   33264             :     return m->defaults;
   33265             : }
   33266           6 : static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
   33267           6 :     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
   33268           6 :     m->defaults_tuple = tuple;
   33269          12 :     Py_INCREF(tuple);
   33270             : }
   33271             : static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
   33272             :     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
   33273             :     m->defaults_kwdict = dict;
   33274             :     Py_INCREF(dict);
   33275             : }
   33276             : static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
   33277             :     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
   33278             :     m->func_annotations = dict;
   33279             :     Py_INCREF(dict);
   33280             : }
   33281             : 
   33282             : /* CythonFunction */
   33283           6 : static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
   33284             :                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
   33285           6 :     PyObject *op = __Pyx_CyFunction_Init(
   33286           6 :         PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
   33287             :         ml, flags, qualname, closure, module, globals, code
   33288             :     );
   33289           6 :     if (likely(op)) {
   33290           6 :         PyObject_GC_Track(op);
   33291             :     }
   33292           6 :     return op;
   33293             : }
   33294             : 
   33295             : /* CLineInTraceback */
   33296             : #ifndef CYTHON_CLINE_IN_TRACEBACK
   33297          44 : static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
   33298          44 :     PyObject *use_cline;
   33299          44 :     PyObject *ptype, *pvalue, *ptraceback;
   33300             : #if CYTHON_COMPILING_IN_CPYTHON
   33301          44 :     PyObject **cython_runtime_dict;
   33302             : #endif
   33303          44 :     CYTHON_MAYBE_UNUSED_VAR(tstate);
   33304          44 :     if (unlikely(!__pyx_cython_runtime)) {
   33305             :         return c_line;
   33306             :     }
   33307          44 :     __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
   33308             : #if CYTHON_COMPILING_IN_CPYTHON
   33309          44 :     cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
   33310          44 :     if (likely(cython_runtime_dict)) {
   33311          44 :         __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
   33312             :             use_cline, *cython_runtime_dict,
   33313             :             __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
   33314             :     } else
   33315             : #endif
   33316             :     {
   33317           0 :       PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
   33318           0 :       if (use_cline_obj) {
   33319           0 :         use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
   33320           0 :         Py_DECREF(use_cline_obj);
   33321             :       } else {
   33322           0 :         PyErr_Clear();
   33323           0 :         use_cline = NULL;
   33324             :       }
   33325             :     }
   33326          44 :     if (!use_cline) {
   33327           0 :         c_line = 0;
   33328           0 :         (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
   33329             :     }
   33330          44 :     else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
   33331             :         c_line = 0;
   33332             :     }
   33333          44 :     __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
   33334          44 :     return c_line;
   33335             : }
   33336             : #endif
   33337             : 
   33338             : /* CodeObjectCache */
   33339             : #if !CYTHON_COMPILING_IN_LIMITED_API
   33340          45 : static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
   33341          45 :     int start = 0, mid = 0, end = count - 1;
   33342          45 :     if (end >= 0 && code_line > entries[end].code_line) {
   33343             :         return count;
   33344             :     }
   33345          53 :     while (start < end) {
   33346           8 :         mid = start + (end - start) / 2;
   33347           8 :         if (code_line < entries[mid].code_line) {
   33348             :             end = mid;
   33349           8 :         } else if (code_line > entries[mid].code_line) {
   33350           8 :              start = mid + 1;
   33351             :         } else {
   33352           0 :             return mid;
   33353             :         }
   33354             :     }
   33355          45 :     if (code_line <= entries[mid].code_line) {
   33356             :         return mid;
   33357             :     } else {
   33358           8 :         return mid + 1;
   33359             :     }
   33360             : }
   33361          44 : static PyCodeObject *__pyx_find_code_object(int code_line) {
   33362          44 :     PyCodeObject* code_object;
   33363          44 :     int pos;
   33364          44 :     if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
   33365             :         return NULL;
   33366             :     }
   33367          43 :     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
   33368          43 :     if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
   33369             :         return NULL;
   33370             :     }
   33371          41 :     code_object = __pyx_code_cache.entries[pos].code_object;
   33372          41 :     Py_INCREF(code_object);
   33373             :     return code_object;
   33374             : }
   33375           3 : static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
   33376           3 :     int pos, i;
   33377           3 :     __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
   33378           3 :     if (unlikely(!code_line)) {
   33379             :         return;
   33380             :     }
   33381           3 :     if (unlikely(!entries)) {
   33382           1 :         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
   33383           1 :         if (likely(entries)) {
   33384           1 :             __pyx_code_cache.entries = entries;
   33385           1 :             __pyx_code_cache.max_count = 64;
   33386           1 :             __pyx_code_cache.count = 1;
   33387           1 :             entries[0].code_line = code_line;
   33388           1 :             entries[0].code_object = code_object;
   33389           1 :             Py_INCREF(code_object);
   33390             :         }
   33391           1 :         return;
   33392             :     }
   33393           2 :     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
   33394           2 :     if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
   33395           0 :         PyCodeObject* tmp = entries[pos].code_object;
   33396           0 :         entries[pos].code_object = code_object;
   33397           0 :         Py_DECREF(tmp);
   33398           0 :         return;
   33399             :     }
   33400           2 :     if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
   33401           0 :         int new_max = __pyx_code_cache.max_count + 64;
   33402           0 :         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
   33403           0 :             __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
   33404           0 :         if (unlikely(!entries)) {
   33405             :             return;
   33406             :         }
   33407           0 :         __pyx_code_cache.entries = entries;
   33408           0 :         __pyx_code_cache.max_count = new_max;
   33409             :     }
   33410           4 :     for (i=__pyx_code_cache.count; i>pos; i--) {
   33411           2 :         entries[i] = entries[i-1];
   33412             :     }
   33413           2 :     entries[pos].code_line = code_line;
   33414           2 :     entries[pos].code_object = code_object;
   33415           2 :     __pyx_code_cache.count++;
   33416           2 :     Py_INCREF(code_object);
   33417             : }
   33418             : #endif
   33419             : 
   33420             : /* AddTraceback */
   33421             : #include "compile.h"
   33422             : #include "frameobject.h"
   33423             : #include "traceback.h"
   33424             : #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
   33425             :   #ifndef Py_BUILD_CORE
   33426             :     #define Py_BUILD_CORE 1
   33427             :   #endif
   33428             :   #include "internal/pycore_frame.h"
   33429             : #endif
   33430             : #if CYTHON_COMPILING_IN_LIMITED_API
   33431             : static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
   33432             :                                                        PyObject *firstlineno, PyObject *name) {
   33433             :     PyObject *replace = NULL;
   33434             :     if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
   33435             :     if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
   33436             :     replace = PyObject_GetAttrString(code, "replace");
   33437             :     if (likely(replace)) {
   33438             :         PyObject *result;
   33439             :         result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict);
   33440             :         Py_DECREF(replace);
   33441             :         return result;
   33442             :     }
   33443             :     PyErr_Clear();
   33444             :     #if __PYX_LIMITED_VERSION_HEX < 0x030780000
   33445             :     {
   33446             :         PyObject *compiled = NULL, *result = NULL;
   33447             :         if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL;
   33448             :         if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL;
   33449             :         compiled = Py_CompileString(
   33450             :             "out = type(code)(\n"
   33451             :             "  code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n"
   33452             :             "  code.co_flags, code.co_code, code.co_consts, code.co_names,\n"
   33453             :             "  code.co_varnames, code.co_filename, co_name, co_firstlineno,\n"
   33454             :             "  code.co_lnotab)\n", "<dummy>", Py_file_input);
   33455             :         if (!compiled) return NULL;
   33456             :         result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict);
   33457             :         Py_DECREF(compiled);
   33458             :         if (!result) PyErr_Print();
   33459             :         Py_DECREF(result);
   33460             :         result = PyDict_GetItemString(scratch_dict, "out");
   33461             :         if (result) Py_INCREF(result);
   33462             :         return result;
   33463             :     }
   33464             :     #else
   33465             :     return NULL;
   33466             :     #endif
   33467             : }
   33468             : static void __Pyx_AddTraceback(const char *funcname, int c_line,
   33469             :                                int py_line, const char *filename) {
   33470             :     PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
   33471             :     PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
   33472             :     PyObject *exc_type, *exc_value, *exc_traceback;
   33473             :     int success = 0;
   33474             :     if (c_line) {
   33475             :         (void) __pyx_cfilenm;
   33476             :         (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
   33477             :     }
   33478             :     PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
   33479             :     code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
   33480             :     if (unlikely(!code_object)) goto bad;
   33481             :     py_py_line = PyLong_FromLong(py_line);
   33482             :     if (unlikely(!py_py_line)) goto bad;
   33483             :     py_funcname = PyUnicode_FromString(funcname);
   33484             :     if (unlikely(!py_funcname)) goto bad;
   33485             :     dict = PyDict_New();
   33486             :     if (unlikely(!dict)) goto bad;
   33487             :     {
   33488             :         PyObject *old_code_object = code_object;
   33489             :         code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
   33490             :         Py_DECREF(old_code_object);
   33491             :     }
   33492             :     if (unlikely(!code_object)) goto bad;
   33493             :     getframe = PySys_GetObject("_getframe");
   33494             :     if (unlikely(!getframe)) goto bad;
   33495             :     if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
   33496             :     frame = PyEval_EvalCode(code_object, dict, dict);
   33497             :     if (unlikely(!frame) || frame == Py_None) goto bad;
   33498             :     success = 1;
   33499             :   bad:
   33500             :     PyErr_Restore(exc_type, exc_value, exc_traceback);
   33501             :     Py_XDECREF(code_object);
   33502             :     Py_XDECREF(py_py_line);
   33503             :     Py_XDECREF(py_funcname);
   33504             :     Py_XDECREF(dict);
   33505             :     Py_XDECREF(replace);
   33506             :     if (success) {
   33507             :         PyTraceBack_Here(
   33508             :             (struct _frame*)frame);
   33509             :     }
   33510             :     Py_XDECREF(frame);
   33511             : }
   33512             : #else
   33513           3 : static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
   33514             :             const char *funcname, int c_line,
   33515             :             int py_line, const char *filename) {
   33516           3 :     PyCodeObject *py_code = NULL;
   33517           3 :     PyObject *py_funcname = NULL;
   33518             :     #if PY_MAJOR_VERSION < 3
   33519             :     PyObject *py_srcfile = NULL;
   33520             :     py_srcfile = PyString_FromString(filename);
   33521             :     if (!py_srcfile) goto bad;
   33522             :     #endif
   33523           3 :     if (c_line) {
   33524             :         #if PY_MAJOR_VERSION < 3
   33525             :         py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
   33526             :         if (!py_funcname) goto bad;
   33527             :         #else
   33528           0 :         py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
   33529           0 :         if (!py_funcname) goto bad;
   33530           0 :         funcname = PyUnicode_AsUTF8(py_funcname);
   33531           0 :         if (!funcname) goto bad;
   33532             :         #endif
   33533             :     }
   33534             :     else {
   33535             :         #if PY_MAJOR_VERSION < 3
   33536             :         py_funcname = PyString_FromString(funcname);
   33537             :         if (!py_funcname) goto bad;
   33538             :         #endif
   33539           3 :     }
   33540             :     #if PY_MAJOR_VERSION < 3
   33541             :     py_code = __Pyx_PyCode_New(
   33542             :         0,
   33543             :         0,
   33544             :         0,
   33545             :         0,
   33546             :         0,
   33547             :         0,
   33548             :         __pyx_empty_bytes, /*PyObject *code,*/
   33549             :         __pyx_empty_tuple, /*PyObject *consts,*/
   33550             :         __pyx_empty_tuple, /*PyObject *names,*/
   33551             :         __pyx_empty_tuple, /*PyObject *varnames,*/
   33552             :         __pyx_empty_tuple, /*PyObject *freevars,*/
   33553             :         __pyx_empty_tuple, /*PyObject *cellvars,*/
   33554             :         py_srcfile,   /*PyObject *filename,*/
   33555             :         py_funcname,  /*PyObject *name,*/
   33556             :         py_line,
   33557             :         __pyx_empty_bytes  /*PyObject *lnotab*/
   33558             :     );
   33559             :     Py_DECREF(py_srcfile);
   33560             :     #else
   33561           3 :     py_code = PyCode_NewEmpty(filename, funcname, py_line);
   33562             :     #endif
   33563           3 :     Py_XDECREF(py_funcname);
   33564           3 :     return py_code;
   33565           0 : bad:
   33566           0 :     Py_XDECREF(py_funcname);
   33567             :     #if PY_MAJOR_VERSION < 3
   33568             :     Py_XDECREF(py_srcfile);
   33569             :     #endif
   33570           0 :     return NULL;
   33571             : }
   33572          44 : static void __Pyx_AddTraceback(const char *funcname, int c_line,
   33573             :                                int py_line, const char *filename) {
   33574          44 :     PyCodeObject *py_code = 0;
   33575          44 :     PyFrameObject *py_frame = 0;
   33576          44 :     PyThreadState *tstate = __Pyx_PyThreadState_Current;
   33577          44 :     PyObject *ptype, *pvalue, *ptraceback;
   33578          44 :     if (c_line) {
   33579          44 :         c_line = __Pyx_CLineForTraceback(tstate, c_line);
   33580             :     }
   33581          88 :     py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
   33582          44 :     if (!py_code) {
   33583           3 :         __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
   33584           3 :         py_code = __Pyx_CreateCodeObjectForTraceback(
   33585             :             funcname, c_line, py_line, filename);
   33586           3 :         if (!py_code) {
   33587             :             /* If the code object creation fails, then we should clear the
   33588             :                fetched exception references and propagate the new exception */
   33589           0 :             Py_XDECREF(ptype);
   33590           0 :             Py_XDECREF(pvalue);
   33591           0 :             Py_XDECREF(ptraceback);
   33592           0 :             goto bad;
   33593             :         }
   33594           3 :         __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
   33595           3 :         __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
   33596             :     }
   33597          88 :     py_frame = PyFrame_New(
   33598             :         tstate,            /*PyThreadState *tstate,*/
   33599             :         py_code,           /*PyCodeObject *code,*/
   33600          44 :         __pyx_d,    /*PyObject *globals,*/
   33601             :         0                  /*PyObject *locals*/
   33602             :     );
   33603          44 :     if (!py_frame) goto bad;
   33604          44 :     __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
   33605          44 :     PyTraceBack_Here(py_frame);
   33606          44 : bad:
   33607          44 :     Py_XDECREF(py_code);
   33608          44 :     Py_XDECREF(py_frame);
   33609          44 : }
   33610             : #endif
   33611             : 
   33612             : #if PY_MAJOR_VERSION < 3
   33613             : static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
   33614             :     __Pyx_TypeName obj_type_name;
   33615             :     if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
   33616             :         if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
   33617             :         if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
   33618             :     obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   33619             :     PyErr_Format(PyExc_TypeError,
   33620             :                  "'" __Pyx_FMT_TYPENAME "' does not have the buffer interface",
   33621             :                  obj_type_name);
   33622             :     __Pyx_DECREF_TypeName(obj_type_name);
   33623             :     return -1;
   33624             : }
   33625             : static void __Pyx_ReleaseBuffer(Py_buffer *view) {
   33626             :     PyObject *obj = view->obj;
   33627             :     if (!obj) return;
   33628             :     if (PyObject_CheckBuffer(obj)) {
   33629             :         PyBuffer_Release(view);
   33630             :         return;
   33631             :     }
   33632             :     if ((0)) {}
   33633             :     view->obj = NULL;
   33634             :     Py_DECREF(obj);
   33635             : }
   33636             : #endif
   33637             : 
   33638             : 
   33639             : /* MemviewSliceIsContig */
   33640             : static int
   33641           0 : __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
   33642             : {
   33643           0 :     int i, index, step, start;
   33644           0 :     Py_ssize_t itemsize = mvs.memview->view.itemsize;
   33645           0 :     if (order == 'F') {
   33646             :         step = 1;
   33647             :         start = 0;
   33648             :     } else {
   33649           0 :         step = -1;
   33650           0 :         start = ndim - 1;
   33651             :     }
   33652           0 :     for (i = 0; i < ndim; i++) {
   33653           0 :         index = start + step * i;
   33654           0 :         if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
   33655             :             return 0;
   33656           0 :         itemsize *= mvs.shape[index];
   33657             :     }
   33658             :     return 1;
   33659             : }
   33660             : 
   33661             : /* OverlappingSlices */
   33662             : static void
   33663           0 : __pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
   33664             :                                void **out_start, void **out_end,
   33665             :                                int ndim, size_t itemsize)
   33666             : {
   33667           0 :     char *start, *end;
   33668           0 :     int i;
   33669           0 :     start = end = slice->data;
   33670           0 :     for (i = 0; i < ndim; i++) {
   33671           0 :         Py_ssize_t stride = slice->strides[i];
   33672           0 :         Py_ssize_t extent = slice->shape[i];
   33673           0 :         if (extent == 0) {
   33674           0 :             *out_start = *out_end = start;
   33675           0 :             return;
   33676             :         } else {
   33677           0 :             if (stride > 0)
   33678           0 :                 end += stride * (extent - 1);
   33679             :             else
   33680           0 :                 start += stride * (extent - 1);
   33681             :         }
   33682             :     }
   33683           0 :     *out_start = start;
   33684           0 :     *out_end = end + itemsize;
   33685             : }
   33686             : static int
   33687           0 : __pyx_slices_overlap(__Pyx_memviewslice *slice1,
   33688             :                      __Pyx_memviewslice *slice2,
   33689             :                      int ndim, size_t itemsize)
   33690             : {
   33691           0 :     void *start1, *end1, *start2, *end2;
   33692           0 :     __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
   33693           0 :     __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
   33694           0 :     return (start1 < end2) && (start2 < end1);
   33695             : }
   33696             : 
   33697             : /* IsLittleEndian */
   33698           0 : static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
   33699             : {
   33700           0 :   union {
   33701             :     uint32_t u32;
   33702             :     uint8_t u8[4];
   33703             :   } S;
   33704           0 :   S.u32 = 0x01020304;
   33705           0 :   return S.u8[0] == 4;
   33706             : }
   33707             : 
   33708             : /* BufferFormatCheck */
   33709        1964 : static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
   33710             :                               __Pyx_BufFmt_StackElem* stack,
   33711             :                               __Pyx_TypeInfo* type) {
   33712        1964 :   stack[0].field = &ctx->root;
   33713        1964 :   stack[0].parent_offset = 0;
   33714        1964 :   ctx->root.type = type;
   33715        1964 :   ctx->root.name = "buffer dtype";
   33716        1964 :   ctx->root.offset = 0;
   33717        1964 :   ctx->head = stack;
   33718        1964 :   ctx->head->field = &ctx->root;
   33719        1964 :   ctx->fmt_offset = 0;
   33720        1964 :   ctx->head->parent_offset = 0;
   33721        1964 :   ctx->new_packmode = '@';
   33722        1964 :   ctx->enc_packmode = '@';
   33723        1964 :   ctx->new_count = 1;
   33724        1964 :   ctx->enc_count = 0;
   33725        1964 :   ctx->enc_type = 0;
   33726        1964 :   ctx->is_complex = 0;
   33727        1964 :   ctx->is_valid_array = 0;
   33728        1964 :   ctx->struct_alignment = 0;
   33729        1964 :   while (type->typegroup == 'S') {
   33730           0 :     ++ctx->head;
   33731           0 :     ctx->head->field = type->fields;
   33732           0 :     ctx->head->parent_offset = 0;
   33733           0 :     type = type->fields->type;
   33734             :   }
   33735        1964 : }
   33736           0 : static int __Pyx_BufFmt_ParseNumber(const char** ts) {
   33737           0 :     int count;
   33738           0 :     const char* t = *ts;
   33739           0 :     if (*t < '0' || *t > '9') {
   33740             :       return -1;
   33741             :     } else {
   33742           0 :         count = *t++ - '0';
   33743           0 :         while (*t >= '0' && *t <= '9') {
   33744           0 :             count *= 10;
   33745           0 :             count += *t++ - '0';
   33746             :         }
   33747             :     }
   33748           0 :     *ts = t;
   33749           0 :     return count;
   33750             : }
   33751           0 : static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
   33752           0 :     int number = __Pyx_BufFmt_ParseNumber(ts);
   33753           0 :     if (number == -1)
   33754           0 :         PyErr_Format(PyExc_ValueError,\
   33755           0 :                      "Does not understand character buffer dtype format string ('%c')", **ts);
   33756           0 :     return number;
   33757             : }
   33758           0 : static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
   33759           0 :   PyErr_Format(PyExc_ValueError,
   33760             :                "Unexpected format string character: '%c'", ch);
   33761             : }
   33762           0 : static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
   33763           0 :   switch (ch) {
   33764             :     case '?': return "'bool'";
   33765           0 :     case 'c': return "'char'";
   33766           0 :     case 'b': return "'signed char'";
   33767           0 :     case 'B': return "'unsigned char'";
   33768           0 :     case 'h': return "'short'";
   33769           0 :     case 'H': return "'unsigned short'";
   33770           0 :     case 'i': return "'int'";
   33771           0 :     case 'I': return "'unsigned int'";
   33772           0 :     case 'l': return "'long'";
   33773           0 :     case 'L': return "'unsigned long'";
   33774           0 :     case 'q': return "'long long'";
   33775           0 :     case 'Q': return "'unsigned long long'";
   33776           0 :     case 'f': return (is_complex ? "'complex float'" : "'float'");
   33777           0 :     case 'd': return (is_complex ? "'complex double'" : "'double'");
   33778           0 :     case 'g': return (is_complex ? "'complex long double'" : "'long double'");
   33779           0 :     case 'T': return "a struct";
   33780           0 :     case 'O': return "Python object";
   33781           0 :     case 'P': return "a pointer";
   33782           0 :     case 's': case 'p': return "a string";
   33783           0 :     case 0: return "end";
   33784           0 :     default: return "unparsable format string";
   33785             :   }
   33786             : }
   33787           0 : static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
   33788           0 :   switch (ch) {
   33789             :     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
   33790           0 :     case 'h': case 'H': return 2;
   33791             :     case 'i': case 'I': case 'l': case 'L': return 4;
   33792             :     case 'q': case 'Q': return 8;
   33793           0 :     case 'f': return (is_complex ? 8 : 4);
   33794           0 :     case 'd': return (is_complex ? 16 : 8);
   33795           0 :     case 'g': {
   33796           0 :       PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
   33797           0 :       return 0;
   33798             :     }
   33799             :     case 'O': case 'P': return sizeof(void*);
   33800           0 :     default:
   33801           0 :       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
   33802           0 :       return 0;
   33803             :     }
   33804             : }
   33805        1964 : static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
   33806        1964 :   switch (ch) {
   33807             :     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
   33808           0 :     case 'h': case 'H': return sizeof(short);
   33809             :     case 'i': case 'I': return sizeof(int);
   33810             :     case 'l': case 'L': return sizeof(long);
   33811             :     #ifdef HAVE_LONG_LONG
   33812             :     case 'q': case 'Q': return sizeof(PY_LONG_LONG);
   33813             :     #endif
   33814           0 :     case 'f': return sizeof(float) * (is_complex ? 2 : 1);
   33815         272 :     case 'd': return sizeof(double) * (is_complex ? 2 : 1);
   33816           0 :     case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
   33817             :     case 'O': case 'P': return sizeof(void*);
   33818           0 :     default: {
   33819           0 :       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
   33820           0 :       return 0;
   33821             :     }
   33822             :   }
   33823             : }
   33824             : typedef struct { char c; short x; } __Pyx_st_short;
   33825             : typedef struct { char c; int x; } __Pyx_st_int;
   33826             : typedef struct { char c; long x; } __Pyx_st_long;
   33827             : typedef struct { char c; float x; } __Pyx_st_float;
   33828             : typedef struct { char c; double x; } __Pyx_st_double;
   33829             : typedef struct { char c; long double x; } __Pyx_st_longdouble;
   33830             : typedef struct { char c; void *x; } __Pyx_st_void_p;
   33831             : #ifdef HAVE_LONG_LONG
   33832             : typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
   33833             : #endif
   33834        1964 : static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, int is_complex) {
   33835        1964 :   CYTHON_UNUSED_VAR(is_complex);
   33836        1964 :   switch (ch) {
   33837             :     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
   33838           0 :     case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
   33839             :     case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
   33840             :     case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
   33841             : #ifdef HAVE_LONG_LONG
   33842             :     case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
   33843             : #endif
   33844             :     case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
   33845             :     case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
   33846           0 :     case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
   33847             :     case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
   33848           0 :     default:
   33849           0 :       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
   33850           0 :       return 0;
   33851             :     }
   33852             : }
   33853             : /* These are for computing the padding at the end of the struct to align
   33854             :    on the first member of the struct. This will probably the same as above,
   33855             :    but we don't have any guarantees.
   33856             :  */
   33857             : typedef struct { short x; char c; } __Pyx_pad_short;
   33858             : typedef struct { int x; char c; } __Pyx_pad_int;
   33859             : typedef struct { long x; char c; } __Pyx_pad_long;
   33860             : typedef struct { float x; char c; } __Pyx_pad_float;
   33861             : typedef struct { double x; char c; } __Pyx_pad_double;
   33862             : typedef struct { long double x; char c; } __Pyx_pad_longdouble;
   33863             : typedef struct { void *x; char c; } __Pyx_pad_void_p;
   33864             : #ifdef HAVE_LONG_LONG
   33865             : typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
   33866             : #endif
   33867        1964 : static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, int is_complex) {
   33868        1964 :   CYTHON_UNUSED_VAR(is_complex);
   33869        1964 :   switch (ch) {
   33870             :     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
   33871           0 :     case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
   33872             :     case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
   33873             :     case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
   33874             : #ifdef HAVE_LONG_LONG
   33875             :     case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
   33876             : #endif
   33877             :     case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
   33878             :     case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
   33879           0 :     case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
   33880             :     case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
   33881           0 :     default:
   33882           0 :       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
   33883           0 :       return 0;
   33884             :     }
   33885             : }
   33886        1964 : static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
   33887        1964 :   switch (ch) {
   33888             :     case 'c':
   33889             :         return 'H';
   33890        1556 :     case 'b': case 'h': case 'i':
   33891             :     case 'l': case 'q': case 's': case 'p':
   33892        1556 :         return 'I';
   33893         136 :     case '?': case 'B': case 'H': case 'I': case 'L': case 'Q':
   33894         136 :         return 'U';
   33895         272 :     case 'f': case 'd': case 'g':
   33896         272 :         return (is_complex ? 'C' : 'R');
   33897           0 :     case 'O':
   33898           0 :         return 'O';
   33899           0 :     case 'P':
   33900           0 :         return 'P';
   33901           0 :     default: {
   33902           0 :       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
   33903           0 :       return 0;
   33904             :     }
   33905             :   }
   33906             : }
   33907           0 : static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
   33908           0 :   if (ctx->head == NULL || ctx->head->field == &ctx->root) {
   33909           0 :     const char* expected;
   33910           0 :     const char* quote;
   33911           0 :     if (ctx->head == NULL) {
   33912             :       expected = "end";
   33913             :       quote = "";
   33914             :     } else {
   33915           0 :       expected = ctx->head->field->type->name;
   33916           0 :       quote = "'";
   33917             :     }
   33918           0 :     PyErr_Format(PyExc_ValueError,
   33919             :                  "Buffer dtype mismatch, expected %s%s%s but got %s",
   33920             :                  quote, expected, quote,
   33921           0 :                  __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
   33922             :   } else {
   33923           0 :     __Pyx_StructField* field = ctx->head->field;
   33924           0 :     __Pyx_StructField* parent = (ctx->head - 1)->field;
   33925           0 :     PyErr_Format(PyExc_ValueError,
   33926             :                  "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
   33927           0 :                  field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
   33928           0 :                  parent->type->name, field->name);
   33929             :   }
   33930           0 : }
   33931        3928 : static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
   33932        3928 :   char group;
   33933        3928 :   size_t size, offset, arraysize = 1;
   33934        3928 :   if (ctx->enc_type == 0) return 0;
   33935        1964 :   if (ctx->head->field->type->arraysize[0]) {
   33936           0 :     int i, ndim = 0;
   33937           0 :     if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
   33938           0 :         ctx->is_valid_array = ctx->head->field->type->ndim == 1;
   33939           0 :         ndim = 1;
   33940           0 :         if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
   33941           0 :             PyErr_Format(PyExc_ValueError,
   33942             :                          "Expected a dimension of size %zu, got %zu",
   33943             :                          ctx->head->field->type->arraysize[0], ctx->enc_count);
   33944           0 :             return -1;
   33945             :         }
   33946             :     }
   33947           0 :     if (!ctx->is_valid_array) {
   33948           0 :       PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
   33949             :                    ctx->head->field->type->ndim, ndim);
   33950           0 :       return -1;
   33951             :     }
   33952           0 :     for (i = 0; i < ctx->head->field->type->ndim; i++) {
   33953           0 :       arraysize *= ctx->head->field->type->arraysize[i];
   33954             :     }
   33955           0 :     ctx->is_valid_array = 0;
   33956           0 :     ctx->enc_count = 1;
   33957             :   }
   33958        1964 :   group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
   33959        1964 :   do {
   33960        1964 :     __Pyx_StructField* field = ctx->head->field;
   33961        1964 :     __Pyx_TypeInfo* type = field->type;
   33962        1964 :     if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
   33963        1964 :       size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
   33964             :     } else {
   33965           0 :       size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
   33966             :     }
   33967        1964 :     if (ctx->enc_packmode == '@') {
   33968        1964 :       size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
   33969        1964 :       size_t align_mod_offset;
   33970        1964 :       if (align_at == 0) return -1;
   33971        1964 :       align_mod_offset = ctx->fmt_offset % align_at;
   33972        1964 :       if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
   33973        1964 :       if (ctx->struct_alignment == 0)
   33974        1964 :           ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
   33975             :                                                                  ctx->is_complex);
   33976             :     }
   33977        1964 :     if (type->size != size || type->typegroup != group) {
   33978           0 :       if (type->typegroup == 'C' && type->fields != NULL) {
   33979           0 :         size_t parent_offset = ctx->head->parent_offset + field->offset;
   33980           0 :         ++ctx->head;
   33981           0 :         ctx->head->field = type->fields;
   33982           0 :         ctx->head->parent_offset = parent_offset;
   33983           0 :         continue;
   33984             :       }
   33985           0 :       if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
   33986             :       } else {
   33987           0 :           __Pyx_BufFmt_RaiseExpected(ctx);
   33988           0 :           return -1;
   33989             :       }
   33990             :     }
   33991        1964 :     offset = ctx->head->parent_offset + field->offset;
   33992        1964 :     if (ctx->fmt_offset != offset) {
   33993           0 :       PyErr_Format(PyExc_ValueError,
   33994             :                    "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
   33995             :                    (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
   33996           0 :       return -1;
   33997             :     }
   33998        1964 :     ctx->fmt_offset += size;
   33999        1964 :     if (arraysize)
   34000        1964 :       ctx->fmt_offset += (arraysize - 1) * size;
   34001        1964 :     --ctx->enc_count;
   34002        1964 :     while (1) {
   34003        1964 :       if (field == &ctx->root) {
   34004        1964 :         ctx->head = NULL;
   34005        1964 :         if (ctx->enc_count != 0) {
   34006           0 :           __Pyx_BufFmt_RaiseExpected(ctx);
   34007           0 :           return -1;
   34008             :         }
   34009             :         break;
   34010             :       }
   34011           0 :       ctx->head->field = ++field;
   34012           0 :       if (field->type == NULL) {
   34013           0 :         --ctx->head;
   34014           0 :         field = ctx->head->field;
   34015           0 :         continue;
   34016           0 :       } else if (field->type->typegroup == 'S') {
   34017           0 :         size_t parent_offset = ctx->head->parent_offset + field->offset;
   34018           0 :         if (field->type->fields->type == NULL) continue;
   34019           0 :         field = field->type->fields;
   34020           0 :         ++ctx->head;
   34021           0 :         ctx->head->field = field;
   34022           0 :         ctx->head->parent_offset = parent_offset;
   34023           0 :         break;
   34024             :       } else {
   34025             :         break;
   34026             :       }
   34027             :     }
   34028        1964 :   } while (ctx->enc_count);
   34029        1964 :   ctx->enc_type = 0;
   34030        1964 :   ctx->is_complex = 0;
   34031        1964 :   return 0;
   34032             : }
   34033             : static int
   34034           0 : __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
   34035             : {
   34036           0 :     const char *ts = *tsp;
   34037           0 :     int i = 0, number, ndim;
   34038           0 :     ++ts;
   34039           0 :     if (ctx->new_count != 1) {
   34040           0 :         PyErr_SetString(PyExc_ValueError,
   34041             :                         "Cannot handle repeated arrays in format string");
   34042           0 :         return -1;
   34043             :     }
   34044           0 :     if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return -1;
   34045           0 :     ndim = ctx->head->field->type->ndim;
   34046           0 :     while (*ts && *ts != ')') {
   34047           0 :         switch (*ts) {
   34048           0 :             case ' ': case '\f': case '\r': case '\n': case '\t': case '\v':  continue;
   34049           0 :             default:  break;
   34050             :         }
   34051           0 :         number = __Pyx_BufFmt_ExpectNumber(&ts);
   34052           0 :         if (number == -1) return -1;
   34053           0 :         if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) {
   34054           0 :             PyErr_Format(PyExc_ValueError,
   34055             :                         "Expected a dimension of size %zu, got %d",
   34056             :                         ctx->head->field->type->arraysize[i], number);
   34057           0 :             return -1;
   34058             :         }
   34059           0 :         if (*ts != ',' && *ts != ')') {
   34060           0 :             PyErr_Format(PyExc_ValueError,
   34061             :                                 "Expected a comma in format string, got '%c'", *ts);
   34062           0 :             return -1;
   34063             :         }
   34064           0 :         if (*ts == ',') ts++;
   34065           0 :         i++;
   34066             :     }
   34067           0 :     if (i != ndim) {
   34068           0 :         PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
   34069           0 :                             ctx->head->field->type->ndim, i);
   34070           0 :         return -1;
   34071             :     }
   34072           0 :     if (!*ts) {
   34073           0 :         PyErr_SetString(PyExc_ValueError,
   34074             :                         "Unexpected end of format string, expected ')'");
   34075           0 :         return -1;
   34076             :     }
   34077           0 :     ctx->is_valid_array = 1;
   34078           0 :     ctx->new_count = 1;
   34079           0 :     *tsp = ++ts;
   34080           0 :     return 0;
   34081             : }
   34082        1964 : static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
   34083        1964 :   int got_Z = 0;
   34084        3928 :   while (1) {
   34085        3928 :     switch(*ts) {
   34086        1964 :       case 0:
   34087        1964 :         if (ctx->enc_type != 0 && ctx->head == NULL) {
   34088           0 :           __Pyx_BufFmt_RaiseExpected(ctx);
   34089           0 :           return NULL;
   34090             :         }
   34091        1964 :         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
   34092        1964 :         if (ctx->head != NULL) {
   34093           0 :           __Pyx_BufFmt_RaiseExpected(ctx);
   34094           0 :           return NULL;
   34095             :         }
   34096             :         return ts;
   34097           0 :       case ' ':
   34098             :       case '\r':
   34099             :       case '\n':
   34100           0 :         ++ts;
   34101           0 :         break;
   34102             :       case '<':
   34103           0 :         if (!__Pyx_Is_Little_Endian()) {
   34104             :           PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
   34105             :           return NULL;
   34106             :         }
   34107           0 :         ctx->new_packmode = '=';
   34108           0 :         ++ts;
   34109           0 :         break;
   34110             :       case '>':
   34111             :       case '!':
   34112           0 :         if (__Pyx_Is_Little_Endian()) {
   34113           0 :           PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
   34114           0 :           return NULL;
   34115             :         }
   34116             :         ctx->new_packmode = '=';
   34117             :         ++ts;
   34118             :         break;
   34119           0 :       case '=':
   34120             :       case '@':
   34121             :       case '^':
   34122           0 :         ctx->new_packmode = *ts++;
   34123           0 :         break;
   34124           0 :       case 'T':
   34125             :         {
   34126           0 :           const char* ts_after_sub;
   34127           0 :           size_t i, struct_count = ctx->new_count;
   34128           0 :           size_t struct_alignment = ctx->struct_alignment;
   34129           0 :           ctx->new_count = 1;
   34130           0 :           ++ts;
   34131           0 :           if (*ts != '{') {
   34132           0 :             PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
   34133           0 :             return NULL;
   34134             :           }
   34135           0 :           if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
   34136           0 :           ctx->enc_type = 0;
   34137           0 :           ctx->enc_count = 0;
   34138           0 :           ctx->struct_alignment = 0;
   34139           0 :           ++ts;
   34140           0 :           ts_after_sub = ts;
   34141           0 :           for (i = 0; i != struct_count; ++i) {
   34142           0 :             ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
   34143           0 :             if (!ts_after_sub) return NULL;
   34144             :           }
   34145           0 :           ts = ts_after_sub;
   34146           0 :           if (struct_alignment) ctx->struct_alignment = struct_alignment;
   34147             :         }
   34148             :         break;
   34149           0 :       case '}':
   34150             :         {
   34151           0 :           size_t alignment = ctx->struct_alignment;
   34152           0 :           ++ts;
   34153           0 :           if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
   34154           0 :           ctx->enc_type = 0;
   34155           0 :           if (alignment && ctx->fmt_offset % alignment) {
   34156           0 :             ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
   34157             :           }
   34158             :         }
   34159             :         return ts;
   34160           0 :       case 'x':
   34161           0 :         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
   34162           0 :         ctx->fmt_offset += ctx->new_count;
   34163           0 :         ctx->new_count = 1;
   34164           0 :         ctx->enc_count = 0;
   34165           0 :         ctx->enc_type = 0;
   34166           0 :         ctx->enc_packmode = ctx->new_packmode;
   34167           0 :         ++ts;
   34168           0 :         break;
   34169           0 :       case 'Z':
   34170           0 :         got_Z = 1;
   34171           0 :         ++ts;
   34172           0 :         if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
   34173           0 :           __Pyx_BufFmt_RaiseUnexpectedChar('Z');
   34174           0 :           return NULL;
   34175             :         }
   34176        1964 :         CYTHON_FALLTHROUGH;
   34177             :       case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
   34178             :       case 'l': case 'L': case 'q': case 'Q':
   34179             :       case 'f': case 'd': case 'g':
   34180             :       case 'O': case 'p':
   34181        1964 :         if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) &&
   34182           0 :             (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) {
   34183           0 :           ctx->enc_count += ctx->new_count;
   34184           0 :           ctx->new_count = 1;
   34185           0 :           got_Z = 0;
   34186           0 :           ++ts;
   34187           0 :           break;
   34188             :         }
   34189        1964 :         CYTHON_FALLTHROUGH;
   34190             :       case 's':
   34191        1964 :         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
   34192        1964 :         ctx->enc_count = ctx->new_count;
   34193        1964 :         ctx->enc_packmode = ctx->new_packmode;
   34194        1964 :         ctx->enc_type = *ts;
   34195        1964 :         ctx->is_complex = got_Z;
   34196        1964 :         ++ts;
   34197        1964 :         ctx->new_count = 1;
   34198        1964 :         got_Z = 0;
   34199        1964 :         break;
   34200           0 :       case ':':
   34201           0 :         ++ts;
   34202           0 :         while(*ts != ':') ++ts;
   34203           0 :         ++ts;
   34204           0 :         break;
   34205           0 :       case '(':
   34206           0 :         if (__pyx_buffmt_parse_array(ctx, &ts) < 0) return NULL;
   34207             :         break;
   34208           0 :       default:
   34209             :         {
   34210           0 :           int number = __Pyx_BufFmt_ExpectNumber(&ts);
   34211           0 :           if (number == -1) return NULL;
   34212           0 :           ctx->new_count = (size_t)number;
   34213             :         }
   34214             :     }
   34215             :   }
   34216             : }
   34217             : 
   34218             : /* TypeInfoCompare */
   34219             :   static int
   34220           0 : __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b)
   34221             : {
   34222           0 :     int i;
   34223           0 :     if (!a || !b)
   34224             :         return 0;
   34225           0 :     if (a == b)
   34226             :         return 1;
   34227           0 :     if (a->size != b->size || a->typegroup != b->typegroup ||
   34228           0 :             a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) {
   34229           0 :         if (a->typegroup == 'H' || b->typegroup == 'H') {
   34230           0 :             return a->size == b->size;
   34231             :         } else {
   34232             :             return 0;
   34233             :         }
   34234             :     }
   34235           0 :     if (a->ndim) {
   34236           0 :         for (i = 0; i < a->ndim; i++)
   34237           0 :             if (a->arraysize[i] != b->arraysize[i])
   34238             :                 return 0;
   34239             :     }
   34240           0 :     if (a->typegroup == 'S') {
   34241           0 :         if (a->flags != b->flags)
   34242             :             return 0;
   34243           0 :         if (a->fields || b->fields) {
   34244           0 :             if (!(a->fields && b->fields))
   34245             :                 return 0;
   34246           0 :             for (i = 0; a->fields[i].type && b->fields[i].type; i++) {
   34247           0 :                 __Pyx_StructField *field_a = a->fields + i;
   34248           0 :                 __Pyx_StructField *field_b = b->fields + i;
   34249           0 :                 if (field_a->offset != field_b->offset ||
   34250           0 :                     !__pyx_typeinfo_cmp(field_a->type, field_b->type))
   34251           0 :                     return 0;
   34252             :             }
   34253           0 :             return !a->fields[i].type && !b->fields[i].type;
   34254             :         }
   34255             :     }
   34256             :     return 1;
   34257             : }
   34258             : 
   34259             : /* MemviewSliceValidateAndInit */
   34260             :   static int
   34261        1910 : __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec)
   34262             : {
   34263        1910 :     if (buf->shape[dim] <= 1)
   34264             :         return 1;
   34265        1879 :     if (buf->strides) {
   34266        1879 :         if (spec & __Pyx_MEMVIEW_CONTIG) {
   34267           0 :             if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) {
   34268           0 :                 if (unlikely(buf->strides[dim] != sizeof(void *))) {
   34269           0 :                     PyErr_Format(PyExc_ValueError,
   34270             :                                  "Buffer is not indirectly contiguous "
   34271             :                                  "in dimension %d.", dim);
   34272           0 :                     goto fail;
   34273             :                 }
   34274           0 :             } else if (unlikely(buf->strides[dim] != buf->itemsize)) {
   34275           0 :                 PyErr_SetString(PyExc_ValueError,
   34276             :                                 "Buffer and memoryview are not contiguous "
   34277             :                                 "in the same dimension.");
   34278           0 :                 goto fail;
   34279             :             }
   34280             :         }
   34281        1879 :         if (spec & __Pyx_MEMVIEW_FOLLOW) {
   34282           0 :             Py_ssize_t stride = buf->strides[dim];
   34283           0 :             if (stride < 0)
   34284             :                 stride = -stride;
   34285           0 :             if (unlikely(stride < buf->itemsize)) {
   34286           0 :                 PyErr_SetString(PyExc_ValueError,
   34287             :                                 "Buffer and memoryview are not contiguous "
   34288             :                                 "in the same dimension.");
   34289           0 :                 goto fail;
   34290             :             }
   34291             :         }
   34292             :     } else {
   34293           0 :         if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) {
   34294           0 :             PyErr_Format(PyExc_ValueError,
   34295             :                          "C-contiguous buffer is not contiguous in "
   34296             :                          "dimension %d", dim);
   34297           0 :             goto fail;
   34298           0 :         } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) {
   34299           0 :             PyErr_Format(PyExc_ValueError,
   34300             :                          "C-contiguous buffer is not indirect in "
   34301             :                          "dimension %d", dim);
   34302           0 :             goto fail;
   34303           0 :         } else if (unlikely(buf->suboffsets)) {
   34304           0 :             PyErr_SetString(PyExc_ValueError,
   34305             :                             "Buffer exposes suboffsets but no strides");
   34306           0 :             goto fail;
   34307             :         }
   34308             :     }
   34309             :     return 1;
   34310             : fail:
   34311             :     return 0;
   34312             : }
   34313             : static int
   34314        1910 : __pyx_check_suboffsets(Py_buffer *buf, int dim, int ndim, int spec)
   34315             : {
   34316        1910 :     CYTHON_UNUSED_VAR(ndim);
   34317        1910 :     if (spec & __Pyx_MEMVIEW_DIRECT) {
   34318        1910 :         if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) {
   34319           0 :             PyErr_Format(PyExc_ValueError,
   34320             :                          "Buffer not compatible with direct access "
   34321             :                          "in dimension %d.", dim);
   34322           0 :             goto fail;
   34323             :         }
   34324             :     }
   34325        1910 :     if (spec & __Pyx_MEMVIEW_PTR) {
   34326           0 :         if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) {
   34327           0 :             PyErr_Format(PyExc_ValueError,
   34328             :                          "Buffer is not indirectly accessible "
   34329             :                          "in dimension %d.", dim);
   34330           0 :             goto fail;
   34331             :         }
   34332             :     }
   34333             :     return 1;
   34334             : fail:
   34335             :     return 0;
   34336             : }
   34337             : static int
   34338        1910 : __pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag)
   34339             : {
   34340        1910 :     int i;
   34341        1910 :     if (c_or_f_flag & __Pyx_IS_F_CONTIG) {
   34342             :         Py_ssize_t stride = 1;
   34343           0 :         for (i = 0; i < ndim; i++) {
   34344           0 :             if (unlikely(stride * buf->itemsize != buf->strides[i]  &&  buf->shape[i] > 1)) {
   34345           0 :                 PyErr_SetString(PyExc_ValueError,
   34346             :                     "Buffer not fortran contiguous.");
   34347           0 :                 goto fail;
   34348             :             }
   34349           0 :             stride = stride * buf->shape[i];
   34350             :         }
   34351        1910 :     } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) {
   34352           0 :         Py_ssize_t stride = 1;
   34353           0 :         for (i = ndim - 1; i >- 1; i--) {
   34354           0 :             if (unlikely(stride * buf->itemsize != buf->strides[i]  &&  buf->shape[i] > 1)) {
   34355           0 :                 PyErr_SetString(PyExc_ValueError,
   34356             :                     "Buffer not C contiguous.");
   34357           0 :                 goto fail;
   34358             :             }
   34359           0 :             stride = stride * buf->shape[i];
   34360             :         }
   34361             :     }
   34362             :     return 1;
   34363             : fail:
   34364             :     return 0;
   34365             : }
   34366        1964 : static int __Pyx_ValidateAndInit_memviewslice(
   34367             :                 int *axes_specs,
   34368             :                 int c_or_f_flag,
   34369             :                 int buf_flags,
   34370             :                 int ndim,
   34371             :                 __Pyx_TypeInfo *dtype,
   34372             :                 __Pyx_BufFmt_StackElem stack[],
   34373             :                 __Pyx_memviewslice *memviewslice,
   34374             :                 PyObject *original_obj)
   34375             : {
   34376        1964 :     struct __pyx_memoryview_obj *memview, *new_memview;
   34377             :     __Pyx_RefNannyDeclarations
   34378        1964 :     Py_buffer *buf;
   34379        1964 :     int i, spec = 0, retval = -1;
   34380        1964 :     __Pyx_BufFmt_Context ctx;
   34381        1964 :     int from_memoryview = __pyx_memoryview_check(original_obj);
   34382        1964 :     __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0);
   34383        1964 :     if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *)
   34384             :                                                             original_obj)->typeinfo)) {
   34385             :         memview = (struct __pyx_memoryview_obj *) original_obj;
   34386             :         new_memview = NULL;
   34387             :     } else {
   34388        1964 :         memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
   34389             :                                             original_obj, buf_flags, 0, dtype);
   34390        1964 :         new_memview = memview;
   34391        1964 :         if (unlikely(!memview))
   34392           0 :             goto fail;
   34393             :     }
   34394        1964 :     buf = &memview->view;
   34395        1964 :     if (unlikely(buf->ndim != ndim)) {
   34396           0 :         PyErr_Format(PyExc_ValueError,
   34397             :                 "Buffer has wrong number of dimensions (expected %d, got %d)",
   34398             :                 ndim, buf->ndim);
   34399           0 :         goto fail;
   34400             :     }
   34401        1964 :     if (new_memview) {
   34402        1964 :         __Pyx_BufFmt_Init(&ctx, stack, dtype);
   34403        1964 :         if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail;
   34404             :     }
   34405        1964 :     if (unlikely((unsigned) buf->itemsize != dtype->size)) {
   34406           0 :         PyErr_Format(PyExc_ValueError,
   34407             :                      "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) "
   34408             :                      "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)",
   34409             :                      buf->itemsize,
   34410             :                      (buf->itemsize > 1) ? "s" : "",
   34411             :                      dtype->name,
   34412             :                      dtype->size,
   34413             :                      (dtype->size > 1) ? "s" : "");
   34414           0 :         goto fail;
   34415             :     }
   34416        1964 :     if (buf->len > 0) {
   34417        3820 :         for (i = 0; i < ndim; i++) {
   34418        1910 :             spec = axes_specs[i];
   34419        1910 :             if (unlikely(!__pyx_check_strides(buf, i, ndim, spec)))
   34420           0 :                 goto fail;
   34421        1910 :             if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec)))
   34422           0 :                 goto fail;
   34423             :         }
   34424        1910 :         if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)))
   34425           0 :             goto fail;
   34426             :     }
   34427        1964 :     if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,
   34428             :                                          new_memview != NULL) == -1)) {
   34429           0 :         goto fail;
   34430             :     }
   34431        1964 :     retval = 0;
   34432        1964 :     goto no_fail;
   34433           0 : fail:
   34434           0 :     Py_XDECREF(new_memview);
   34435           0 :     retval = -1;
   34436        1964 : no_fail:
   34437        1964 :     __Pyx_RefNannyFinishContext();
   34438        1964 :     return retval;
   34439             : }
   34440             : 
   34441             : /* ObjectToMemviewSlice */
   34442         270 :   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t__const__(PyObject *obj, int writable_flag) {
   34443         270 :     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
   34444         270 :     __Pyx_BufFmt_StackElem stack[1];
   34445         270 :     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
   34446         270 :     int retcode;
   34447         270 :     if (obj == Py_None) {
   34448           0 :         result.memview = (struct __pyx_memoryview_obj *) Py_None;
   34449           0 :         return result;
   34450             :     }
   34451         270 :     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
   34452             :                                                  PyBUF_RECORDS_RO | writable_flag, 1,
   34453             :                                                  &__Pyx_TypeInfo_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t__const__, stack,
   34454             :                                                  &result, obj);
   34455         270 :     if (unlikely(retcode == -1))
   34456           0 :         goto __pyx_fail;
   34457         270 :     return result;
   34458           0 : __pyx_fail:
   34459           0 :     result.memview = NULL;
   34460           0 :     result.data = NULL;
   34461           0 :     return result;
   34462             : }
   34463             : 
   34464             : /* CIntFromPyVerify */
   34465             :   #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
   34466             :     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
   34467             : #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
   34468             :     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
   34469             : #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
   34470             :     {\
   34471             :         func_type value = func_value;\
   34472             :         if (sizeof(target_type) < sizeof(func_type)) {\
   34473             :             if (unlikely(value != (func_type) (target_type) value)) {\
   34474             :                 func_type zero = 0;\
   34475             :                 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
   34476             :                     return (target_type) -1;\
   34477             :                 if (is_unsigned && unlikely(value < zero))\
   34478             :                     goto raise_neg_overflow;\
   34479             :                 else\
   34480             :                     goto raise_overflow;\
   34481             :             }\
   34482             :         }\
   34483             :         return (target_type) value;\
   34484             :     }
   34485             : 
   34486             : /* ObjectToMemviewSlice */
   34487        1286 :   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(PyObject *obj, int writable_flag) {
   34488        1286 :     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
   34489        1286 :     __Pyx_BufFmt_StackElem stack[1];
   34490        1286 :     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
   34491        1286 :     int retcode;
   34492        1286 :     if (obj == Py_None) {
   34493           0 :         result.memview = (struct __pyx_memoryview_obj *) Py_None;
   34494           0 :         return result;
   34495             :     }
   34496        1286 :     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
   34497             :                                                  PyBUF_RECORDS_RO | writable_flag, 1,
   34498             :                                                  &__Pyx_TypeInfo_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t, stack,
   34499             :                                                  &result, obj);
   34500        1286 :     if (unlikely(retcode == -1))
   34501           0 :         goto __pyx_fail;
   34502        1286 :     return result;
   34503           0 : __pyx_fail:
   34504           0 :     result.memview = NULL;
   34505           0 :     result.data = NULL;
   34506           0 :     return result;
   34507             : }
   34508             : 
   34509             : /* MemviewDtypeToObject */
   34510           0 :   static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(const char *itemp) {
   34511           0 :     return (PyObject *) __Pyx_PyInt_From_npy_int32(*(__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) itemp);
   34512             : }
   34513           0 : static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t(const char *itemp, PyObject *obj) {
   34514           0 :     __pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t value = __Pyx_PyInt_As_npy_int32(obj);
   34515           0 :     if (unlikely((value == ((npy_int32)-1)) && PyErr_Occurred()))
   34516             :         return 0;
   34517           0 :     *(__pyx_t_5scipy_6sparse_7csgraph_9_matching_ITYPE_t *) itemp = value;
   34518           0 :     return 1;
   34519             : }
   34520             : 
   34521             : /* ObjectToMemviewSlice */
   34522         272 :   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t(PyObject *obj, int writable_flag) {
   34523         272 :     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
   34524         272 :     __Pyx_BufFmt_StackElem stack[1];
   34525         272 :     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
   34526         272 :     int retcode;
   34527         272 :     if (obj == Py_None) {
   34528           0 :         result.memview = (struct __pyx_memoryview_obj *) Py_None;
   34529           0 :         return result;
   34530             :     }
   34531         272 :     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
   34532             :                                                  PyBUF_RECORDS_RO | writable_flag, 1,
   34533             :                                                  &__Pyx_TypeInfo_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_DTYPE_t, stack,
   34534             :                                                  &result, obj);
   34535         272 :     if (unlikely(retcode == -1))
   34536           0 :         goto __pyx_fail;
   34537         272 :     return result;
   34538           0 : __pyx_fail:
   34539           0 :     result.memview = NULL;
   34540           0 :     result.data = NULL;
   34541           0 :     return result;
   34542             : }
   34543             : 
   34544             : /* ObjectToMemviewSlice */
   34545         136 :   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_BTYPE_t(PyObject *obj, int writable_flag) {
   34546         136 :     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
   34547         136 :     __Pyx_BufFmt_StackElem stack[1];
   34548         136 :     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
   34549         136 :     int retcode;
   34550         136 :     if (obj == Py_None) {
   34551           0 :         result.memview = (struct __pyx_memoryview_obj *) Py_None;
   34552           0 :         return result;
   34553             :     }
   34554         136 :     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
   34555             :                                                  PyBUF_RECORDS_RO | writable_flag, 1,
   34556             :                                                  &__Pyx_TypeInfo_nn___pyx_t_5scipy_6sparse_7csgraph_9_matching_BTYPE_t, stack,
   34557             :                                                  &result, obj);
   34558         136 :     if (unlikely(retcode == -1))
   34559           0 :         goto __pyx_fail;
   34560         136 :     return result;
   34561           0 : __pyx_fail:
   34562           0 :     result.memview = NULL;
   34563           0 :     result.data = NULL;
   34564           0 :     return result;
   34565             : }
   34566             : 
   34567             : /* Declarations */
   34568             :   #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
   34569             :   #ifdef __cplusplus
   34570             :     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
   34571             :       return ::std::complex< float >(x, y);
   34572             :     }
   34573             :   #else
   34574             :     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
   34575             :       return x + y*(__pyx_t_float_complex)_Complex_I;
   34576             :     }
   34577             :   #endif
   34578             : #else
   34579             :     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
   34580             :       __pyx_t_float_complex z;
   34581             :       z.real = x;
   34582             :       z.imag = y;
   34583             :       return z;
   34584             :     }
   34585             : #endif
   34586             : 
   34587             : /* Arithmetic */
   34588             :   #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
   34589             : #else
   34590             :     static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   34591             :        return (a.real == b.real) && (a.imag == b.imag);
   34592             :     }
   34593             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   34594             :         __pyx_t_float_complex z;
   34595             :         z.real = a.real + b.real;
   34596             :         z.imag = a.imag + b.imag;
   34597             :         return z;
   34598             :     }
   34599             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   34600             :         __pyx_t_float_complex z;
   34601             :         z.real = a.real - b.real;
   34602             :         z.imag = a.imag - b.imag;
   34603             :         return z;
   34604             :     }
   34605             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   34606             :         __pyx_t_float_complex z;
   34607             :         z.real = a.real * b.real - a.imag * b.imag;
   34608             :         z.imag = a.real * b.imag + a.imag * b.real;
   34609             :         return z;
   34610             :     }
   34611             :     #if 1
   34612             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   34613             :         if (b.imag == 0) {
   34614             :             return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
   34615             :         } else if (fabsf(b.real) >= fabsf(b.imag)) {
   34616             :             if (b.real == 0 && b.imag == 0) {
   34617             :                 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
   34618             :             } else {
   34619             :                 float r = b.imag / b.real;
   34620             :                 float s = (float)(1.0) / (b.real + b.imag * r);
   34621             :                 return __pyx_t_float_complex_from_parts(
   34622             :                     (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
   34623             :             }
   34624             :         } else {
   34625             :             float r = b.real / b.imag;
   34626             :             float s = (float)(1.0) / (b.imag + b.real * r);
   34627             :             return __pyx_t_float_complex_from_parts(
   34628             :                 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
   34629             :         }
   34630             :     }
   34631             :     #else
   34632             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   34633             :         if (b.imag == 0) {
   34634             :             return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
   34635             :         } else {
   34636             :             float denom = b.real * b.real + b.imag * b.imag;
   34637             :             return __pyx_t_float_complex_from_parts(
   34638             :                 (a.real * b.real + a.imag * b.imag) / denom,
   34639             :                 (a.imag * b.real - a.real * b.imag) / denom);
   34640             :         }
   34641             :     }
   34642             :     #endif
   34643             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
   34644             :         __pyx_t_float_complex z;
   34645             :         z.real = -a.real;
   34646             :         z.imag = -a.imag;
   34647             :         return z;
   34648             :     }
   34649             :     static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
   34650             :        return (a.real == 0) && (a.imag == 0);
   34651             :     }
   34652             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
   34653             :         __pyx_t_float_complex z;
   34654             :         z.real =  a.real;
   34655             :         z.imag = -a.imag;
   34656             :         return z;
   34657             :     }
   34658             :     #if 1
   34659             :         static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
   34660             :           #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
   34661             :             return sqrtf(z.real*z.real + z.imag*z.imag);
   34662             :           #else
   34663             :             return hypotf(z.real, z.imag);
   34664             :           #endif
   34665             :         }
   34666             :         static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   34667             :             __pyx_t_float_complex z;
   34668             :             float r, lnr, theta, z_r, z_theta;
   34669             :             if (b.imag == 0 && b.real == (int)b.real) {
   34670             :                 if (b.real < 0) {
   34671             :                     float denom = a.real * a.real + a.imag * a.imag;
   34672             :                     a.real = a.real / denom;
   34673             :                     a.imag = -a.imag / denom;
   34674             :                     b.real = -b.real;
   34675             :                 }
   34676             :                 switch ((int)b.real) {
   34677             :                     case 0:
   34678             :                         z.real = 1;
   34679             :                         z.imag = 0;
   34680             :                         return z;
   34681             :                     case 1:
   34682             :                         return a;
   34683             :                     case 2:
   34684             :                         return __Pyx_c_prod_float(a, a);
   34685             :                     case 3:
   34686             :                         z = __Pyx_c_prod_float(a, a);
   34687             :                         return __Pyx_c_prod_float(z, a);
   34688             :                     case 4:
   34689             :                         z = __Pyx_c_prod_float(a, a);
   34690             :                         return __Pyx_c_prod_float(z, z);
   34691             :                 }
   34692             :             }
   34693             :             if (a.imag == 0) {
   34694             :                 if (a.real == 0) {
   34695             :                     return a;
   34696             :                 } else if ((b.imag == 0) && (a.real >= 0)) {
   34697             :                     z.real = powf(a.real, b.real);
   34698             :                     z.imag = 0;
   34699             :                     return z;
   34700             :                 } else if (a.real > 0) {
   34701             :                     r = a.real;
   34702             :                     theta = 0;
   34703             :                 } else {
   34704             :                     r = -a.real;
   34705             :                     theta = atan2f(0.0, -1.0);
   34706             :                 }
   34707             :             } else {
   34708             :                 r = __Pyx_c_abs_float(a);
   34709             :                 theta = atan2f(a.imag, a.real);
   34710             :             }
   34711             :             lnr = logf(r);
   34712             :             z_r = expf(lnr * b.real - theta * b.imag);
   34713             :             z_theta = theta * b.real + lnr * b.imag;
   34714             :             z.real = z_r * cosf(z_theta);
   34715             :             z.imag = z_r * sinf(z_theta);
   34716             :             return z;
   34717             :         }
   34718             :     #endif
   34719             : #endif
   34720             : 
   34721             : /* Declarations */
   34722             :   #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
   34723             :   #ifdef __cplusplus
   34724             :     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
   34725             :       return ::std::complex< double >(x, y);
   34726             :     }
   34727             :   #else
   34728             :     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
   34729             :       return x + y*(__pyx_t_double_complex)_Complex_I;
   34730             :     }
   34731             :   #endif
   34732             : #else
   34733             :     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
   34734             :       __pyx_t_double_complex z;
   34735             :       z.real = x;
   34736             :       z.imag = y;
   34737             :       return z;
   34738             :     }
   34739             : #endif
   34740             : 
   34741             : /* Arithmetic */
   34742             :   #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
   34743             : #else
   34744             :     static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   34745             :        return (a.real == b.real) && (a.imag == b.imag);
   34746             :     }
   34747             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   34748             :         __pyx_t_double_complex z;
   34749             :         z.real = a.real + b.real;
   34750             :         z.imag = a.imag + b.imag;
   34751             :         return z;
   34752             :     }
   34753             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   34754             :         __pyx_t_double_complex z;
   34755             :         z.real = a.real - b.real;
   34756             :         z.imag = a.imag - b.imag;
   34757             :         return z;
   34758             :     }
   34759             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   34760             :         __pyx_t_double_complex z;
   34761             :         z.real = a.real * b.real - a.imag * b.imag;
   34762             :         z.imag = a.real * b.imag + a.imag * b.real;
   34763             :         return z;
   34764             :     }
   34765             :     #if 1
   34766             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   34767             :         if (b.imag == 0) {
   34768             :             return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
   34769             :         } else if (fabs(b.real) >= fabs(b.imag)) {
   34770             :             if (b.real == 0 && b.imag == 0) {
   34771             :                 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
   34772             :             } else {
   34773             :                 double r = b.imag / b.real;
   34774             :                 double s = (double)(1.0) / (b.real + b.imag * r);
   34775             :                 return __pyx_t_double_complex_from_parts(
   34776             :                     (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
   34777             :             }
   34778             :         } else {
   34779             :             double r = b.real / b.imag;
   34780             :             double s = (double)(1.0) / (b.imag + b.real * r);
   34781             :             return __pyx_t_double_complex_from_parts(
   34782             :                 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
   34783             :         }
   34784             :     }
   34785             :     #else
   34786             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   34787             :         if (b.imag == 0) {
   34788             :             return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
   34789             :         } else {
   34790             :             double denom = b.real * b.real + b.imag * b.imag;
   34791             :             return __pyx_t_double_complex_from_parts(
   34792             :                 (a.real * b.real + a.imag * b.imag) / denom,
   34793             :                 (a.imag * b.real - a.real * b.imag) / denom);
   34794             :         }
   34795             :     }
   34796             :     #endif
   34797             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
   34798             :         __pyx_t_double_complex z;
   34799             :         z.real = -a.real;
   34800             :         z.imag = -a.imag;
   34801             :         return z;
   34802             :     }
   34803             :     static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
   34804             :        return (a.real == 0) && (a.imag == 0);
   34805             :     }
   34806             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
   34807             :         __pyx_t_double_complex z;
   34808             :         z.real =  a.real;
   34809             :         z.imag = -a.imag;
   34810             :         return z;
   34811             :     }
   34812             :     #if 1
   34813             :         static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
   34814             :           #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
   34815             :             return sqrt(z.real*z.real + z.imag*z.imag);
   34816             :           #else
   34817             :             return hypot(z.real, z.imag);
   34818             :           #endif
   34819             :         }
   34820             :         static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   34821             :             __pyx_t_double_complex z;
   34822             :             double r, lnr, theta, z_r, z_theta;
   34823             :             if (b.imag == 0 && b.real == (int)b.real) {
   34824             :                 if (b.real < 0) {
   34825             :                     double denom = a.real * a.real + a.imag * a.imag;
   34826             :                     a.real = a.real / denom;
   34827             :                     a.imag = -a.imag / denom;
   34828             :                     b.real = -b.real;
   34829             :                 }
   34830             :                 switch ((int)b.real) {
   34831             :                     case 0:
   34832             :                         z.real = 1;
   34833             :                         z.imag = 0;
   34834             :                         return z;
   34835             :                     case 1:
   34836             :                         return a;
   34837             :                     case 2:
   34838             :                         return __Pyx_c_prod_double(a, a);
   34839             :                     case 3:
   34840             :                         z = __Pyx_c_prod_double(a, a);
   34841             :                         return __Pyx_c_prod_double(z, a);
   34842             :                     case 4:
   34843             :                         z = __Pyx_c_prod_double(a, a);
   34844             :                         return __Pyx_c_prod_double(z, z);
   34845             :                 }
   34846             :             }
   34847             :             if (a.imag == 0) {
   34848             :                 if (a.real == 0) {
   34849             :                     return a;
   34850             :                 } else if ((b.imag == 0) && (a.real >= 0)) {
   34851             :                     z.real = pow(a.real, b.real);
   34852             :                     z.imag = 0;
   34853             :                     return z;
   34854             :                 } else if (a.real > 0) {
   34855             :                     r = a.real;
   34856             :                     theta = 0;
   34857             :                 } else {
   34858             :                     r = -a.real;
   34859             :                     theta = atan2(0.0, -1.0);
   34860             :                 }
   34861             :             } else {
   34862             :                 r = __Pyx_c_abs_double(a);
   34863             :                 theta = atan2(a.imag, a.real);
   34864             :             }
   34865             :             lnr = log(r);
   34866             :             z_r = exp(lnr * b.real - theta * b.imag);
   34867             :             z_theta = theta * b.real + lnr * b.imag;
   34868             :             z.real = z_r * cos(z_theta);
   34869             :             z.imag = z_r * sin(z_theta);
   34870             :             return z;
   34871             :         }
   34872             :     #endif
   34873             : #endif
   34874             : 
   34875             : /* Declarations */
   34876             :   #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
   34877             :   #ifdef __cplusplus
   34878             :     static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
   34879             :       return ::std::complex< long double >(x, y);
   34880             :     }
   34881             :   #else
   34882             :     static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
   34883             :       return x + y*(__pyx_t_long_double_complex)_Complex_I;
   34884             :     }
   34885             :   #endif
   34886             : #else
   34887             :     static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
   34888             :       __pyx_t_long_double_complex z;
   34889             :       z.real = x;
   34890             :       z.imag = y;
   34891             :       return z;
   34892             :     }
   34893             : #endif
   34894             : 
   34895             : /* Arithmetic */
   34896             :   #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
   34897             : #else
   34898             :     static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   34899             :        return (a.real == b.real) && (a.imag == b.imag);
   34900             :     }
   34901             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   34902             :         __pyx_t_long_double_complex z;
   34903             :         z.real = a.real + b.real;
   34904             :         z.imag = a.imag + b.imag;
   34905             :         return z;
   34906             :     }
   34907             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   34908             :         __pyx_t_long_double_complex z;
   34909             :         z.real = a.real - b.real;
   34910             :         z.imag = a.imag - b.imag;
   34911             :         return z;
   34912             :     }
   34913             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   34914             :         __pyx_t_long_double_complex z;
   34915             :         z.real = a.real * b.real - a.imag * b.imag;
   34916             :         z.imag = a.real * b.imag + a.imag * b.real;
   34917             :         return z;
   34918             :     }
   34919             :     #if 1
   34920             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   34921             :         if (b.imag == 0) {
   34922             :             return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
   34923             :         } else if (fabsl(b.real) >= fabsl(b.imag)) {
   34924             :             if (b.real == 0 && b.imag == 0) {
   34925             :                 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
   34926             :             } else {
   34927             :                 long double r = b.imag / b.real;
   34928             :                 long double s = (long double)(1.0) / (b.real + b.imag * r);
   34929             :                 return __pyx_t_long_double_complex_from_parts(
   34930             :                     (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
   34931             :             }
   34932             :         } else {
   34933             :             long double r = b.real / b.imag;
   34934             :             long double s = (long double)(1.0) / (b.imag + b.real * r);
   34935             :             return __pyx_t_long_double_complex_from_parts(
   34936             :                 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
   34937             :         }
   34938             :     }
   34939             :     #else
   34940             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   34941             :         if (b.imag == 0) {
   34942             :             return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
   34943             :         } else {
   34944             :             long double denom = b.real * b.real + b.imag * b.imag;
   34945             :             return __pyx_t_long_double_complex_from_parts(
   34946             :                 (a.real * b.real + a.imag * b.imag) / denom,
   34947             :                 (a.imag * b.real - a.real * b.imag) / denom);
   34948             :         }
   34949             :     }
   34950             :     #endif
   34951             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex a) {
   34952             :         __pyx_t_long_double_complex z;
   34953             :         z.real = -a.real;
   34954             :         z.imag = -a.imag;
   34955             :         return z;
   34956             :     }
   34957             :     static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex a) {
   34958             :        return (a.real == 0) && (a.imag == 0);
   34959             :     }
   34960             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex a) {
   34961             :         __pyx_t_long_double_complex z;
   34962             :         z.real =  a.real;
   34963             :         z.imag = -a.imag;
   34964             :         return z;
   34965             :     }
   34966             :     #if 1
   34967             :         static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex z) {
   34968             :           #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
   34969             :             return sqrtl(z.real*z.real + z.imag*z.imag);
   34970             :           #else
   34971             :             return hypotl(z.real, z.imag);
   34972             :           #endif
   34973             :         }
   34974             :         static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   34975             :             __pyx_t_long_double_complex z;
   34976             :             long double r, lnr, theta, z_r, z_theta;
   34977             :             if (b.imag == 0 && b.real == (int)b.real) {
   34978             :                 if (b.real < 0) {
   34979             :                     long double denom = a.real * a.real + a.imag * a.imag;
   34980             :                     a.real = a.real / denom;
   34981             :                     a.imag = -a.imag / denom;
   34982             :                     b.real = -b.real;
   34983             :                 }
   34984             :                 switch ((int)b.real) {
   34985             :                     case 0:
   34986             :                         z.real = 1;
   34987             :                         z.imag = 0;
   34988             :                         return z;
   34989             :                     case 1:
   34990             :                         return a;
   34991             :                     case 2:
   34992             :                         return __Pyx_c_prod_long__double(a, a);
   34993             :                     case 3:
   34994             :                         z = __Pyx_c_prod_long__double(a, a);
   34995             :                         return __Pyx_c_prod_long__double(z, a);
   34996             :                     case 4:
   34997             :                         z = __Pyx_c_prod_long__double(a, a);
   34998             :                         return __Pyx_c_prod_long__double(z, z);
   34999             :                 }
   35000             :             }
   35001             :             if (a.imag == 0) {
   35002             :                 if (a.real == 0) {
   35003             :                     return a;
   35004             :                 } else if ((b.imag == 0) && (a.real >= 0)) {
   35005             :                     z.real = powl(a.real, b.real);
   35006             :                     z.imag = 0;
   35007             :                     return z;
   35008             :                 } else if (a.real > 0) {
   35009             :                     r = a.real;
   35010             :                     theta = 0;
   35011             :                 } else {
   35012             :                     r = -a.real;
   35013             :                     theta = atan2l(0.0, -1.0);
   35014             :                 }
   35015             :             } else {
   35016             :                 r = __Pyx_c_abs_long__double(a);
   35017             :                 theta = atan2l(a.imag, a.real);
   35018             :             }
   35019             :             lnr = logl(r);
   35020             :             z_r = expl(lnr * b.real - theta * b.imag);
   35021             :             z_theta = theta * b.real + lnr * b.imag;
   35022             :             z.real = z_r * cosl(z_theta);
   35023             :             z.imag = z_r * sinl(z_theta);
   35024             :             return z;
   35025             :         }
   35026             :     #endif
   35027             : #endif
   35028             : 
   35029             : /* MemviewSliceCopyTemplate */
   35030             :   static __Pyx_memviewslice
   35031           0 : __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
   35032             :                                  const char *mode, int ndim,
   35033             :                                  size_t sizeof_dtype, int contig_flag,
   35034             :                                  int dtype_is_object)
   35035             : {
   35036             :     __Pyx_RefNannyDeclarations
   35037           0 :     int i;
   35038           0 :     __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } };
   35039           0 :     struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
   35040           0 :     Py_buffer *buf = &from_memview->view;
   35041           0 :     PyObject *shape_tuple = NULL;
   35042           0 :     PyObject *temp_int = NULL;
   35043           0 :     struct __pyx_array_obj *array_obj = NULL;
   35044           0 :     struct __pyx_memoryview_obj *memview_obj = NULL;
   35045           0 :     __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
   35046           0 :     for (i = 0; i < ndim; i++) {
   35047           0 :         if (unlikely(from_mvs->suboffsets[i] >= 0)) {
   35048           0 :             PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
   35049             :                                            "indirect dimensions (axis %d)", i);
   35050           0 :             goto fail;
   35051             :         }
   35052             :     }
   35053           0 :     shape_tuple = PyTuple_New(ndim);
   35054           0 :     if (unlikely(!shape_tuple)) {
   35055           0 :         goto fail;
   35056             :     }
   35057             :     __Pyx_GOTREF(shape_tuple);
   35058           0 :     for(i = 0; i < ndim; i++) {
   35059           0 :         temp_int = PyInt_FromSsize_t(from_mvs->shape[i]);
   35060           0 :         if(unlikely(!temp_int)) {
   35061           0 :             goto fail;
   35062             :         } else {
   35063           0 :             PyTuple_SET_ITEM(shape_tuple, i, temp_int);
   35064           0 :             temp_int = NULL;
   35065             :         }
   35066             :     }
   35067           0 :     array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL);
   35068           0 :     if (unlikely(!array_obj)) {
   35069           0 :         goto fail;
   35070             :     }
   35071           0 :     __Pyx_GOTREF(array_obj);
   35072           0 :     memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
   35073             :                                     (PyObject *) array_obj, contig_flag,
   35074             :                                     dtype_is_object,
   35075           0 :                                     from_mvs->memview->typeinfo);
   35076           0 :     if (unlikely(!memview_obj))
   35077           0 :         goto fail;
   35078           0 :     if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
   35079           0 :         goto fail;
   35080           0 :     if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
   35081             :                                                 dtype_is_object) < 0))
   35082           0 :         goto fail;
   35083           0 :     goto no_fail;
   35084           0 : fail:
   35085           0 :     __Pyx_XDECREF(new_mvs.memview);
   35086           0 :     new_mvs.memview = NULL;
   35087           0 :     new_mvs.data = NULL;
   35088           0 : no_fail:
   35089           0 :     __Pyx_XDECREF(shape_tuple);
   35090           0 :     __Pyx_XDECREF(temp_int);
   35091           0 :     __Pyx_XDECREF(array_obj);
   35092           0 :     __Pyx_RefNannyFinishContext();
   35093           0 :     return new_mvs;
   35094             : }
   35095             : 
   35096             : /* MemviewSliceInit */
   35097             :   static int
   35098        1964 : __Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
   35099             :                         int ndim,
   35100             :                         __Pyx_memviewslice *memviewslice,
   35101             :                         int memview_is_new_reference)
   35102             : {
   35103             :     __Pyx_RefNannyDeclarations
   35104        1964 :     int i, retval=-1;
   35105        1964 :     Py_buffer *buf = &memview->view;
   35106        1964 :     __Pyx_RefNannySetupContext("init_memviewslice", 0);
   35107        1964 :     if (unlikely(memviewslice->memview || memviewslice->data)) {
   35108           0 :         PyErr_SetString(PyExc_ValueError,
   35109             :             "memviewslice is already initialized!");
   35110           0 :         goto fail;
   35111             :     }
   35112        1964 :     if (buf->strides) {
   35113        3928 :         for (i = 0; i < ndim; i++) {
   35114        1964 :             memviewslice->strides[i] = buf->strides[i];
   35115             :         }
   35116             :     } else {
   35117           0 :         Py_ssize_t stride = buf->itemsize;
   35118           0 :         for (i = ndim - 1; i >= 0; i--) {
   35119           0 :             memviewslice->strides[i] = stride;
   35120           0 :             stride *= buf->shape[i];
   35121             :         }
   35122             :     }
   35123        3928 :     for (i = 0; i < ndim; i++) {
   35124        1964 :         memviewslice->shape[i]   = buf->shape[i];
   35125        1964 :         if (buf->suboffsets) {
   35126           0 :             memviewslice->suboffsets[i] = buf->suboffsets[i];
   35127             :         } else {
   35128        1964 :             memviewslice->suboffsets[i] = -1;
   35129             :         }
   35130             :     }
   35131        1964 :     memviewslice->memview = memview;
   35132        1964 :     memviewslice->data = (char *)buf->buf;
   35133        1964 :     if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
   35134           0 :         Py_INCREF(memview);
   35135             :     }
   35136        1964 :     retval = 0;
   35137        1964 :     goto no_fail;
   35138           0 : fail:
   35139           0 :     memviewslice->memview = 0;
   35140           0 :     memviewslice->data = 0;
   35141           0 :     retval = -1;
   35142        1964 : no_fail:
   35143        1964 :     __Pyx_RefNannyFinishContext();
   35144        1964 :     return retval;
   35145             : }
   35146             : #ifndef Py_NO_RETURN
   35147             : #define Py_NO_RETURN
   35148             : #endif
   35149           0 : static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
   35150           0 :     va_list vargs;
   35151           0 :     char msg[200];
   35152             : #if PY_VERSION_HEX >= 0x030A0000 || defined(HAVE_STDARG_PROTOTYPES)
   35153           0 :     va_start(vargs, fmt);
   35154             : #else
   35155             :     va_start(vargs);
   35156             : #endif
   35157           0 :     vsnprintf(msg, 200, fmt, vargs);
   35158           0 :     va_end(vargs);
   35159           0 :     Py_FatalError(msg);
   35160             : }
   35161             : static CYTHON_INLINE int
   35162             : __pyx_add_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count,
   35163             :                                    PyThread_type_lock lock)
   35164             : {
   35165             :     int result;
   35166             :     PyThread_acquire_lock(lock, 1);
   35167             :     result = (*acquisition_count)++;
   35168             :     PyThread_release_lock(lock);
   35169             :     return result;
   35170             : }
   35171             : static CYTHON_INLINE int
   35172             : __pyx_sub_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count,
   35173             :                                    PyThread_type_lock lock)
   35174             : {
   35175             :     int result;
   35176             :     PyThread_acquire_lock(lock, 1);
   35177             :     result = (*acquisition_count)--;
   35178             :     PyThread_release_lock(lock);
   35179             :     return result;
   35180             : }
   35181             : static CYTHON_INLINE void
   35182         406 : __Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
   35183             : {
   35184         406 :     __pyx_nonatomic_int_type old_acquisition_count;
   35185         406 :     struct __pyx_memoryview_obj *memview = memslice->memview;
   35186         406 :     if (unlikely(!memview || (PyObject *) memview == Py_None)) {
   35187             :         return;
   35188             :     }
   35189         406 :     old_acquisition_count = __pyx_add_acquisition_count(memview);
   35190         406 :     if (unlikely(old_acquisition_count <= 0)) {
   35191           0 :         if (likely(old_acquisition_count == 0)) {
   35192           0 :             if (have_gil) {
   35193           0 :                 Py_INCREF((PyObject *) memview);
   35194             :             } else {
   35195           0 :                 PyGILState_STATE _gilstate = PyGILState_Ensure();
   35196           0 :                 Py_INCREF((PyObject *) memview);
   35197           0 :                 PyGILState_Release(_gilstate);
   35198             :             }
   35199             :         } else {
   35200           0 :             __pyx_fatalerror("Acquisition count is %d (line %d)",
   35201             :                              old_acquisition_count+1, lineno);
   35202             :         }
   35203             :     }
   35204             : }
   35205        2630 : static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice,
   35206             :                                              int have_gil, int lineno) {
   35207        2630 :     __pyx_nonatomic_int_type old_acquisition_count;
   35208        2630 :     struct __pyx_memoryview_obj *memview = memslice->memview;
   35209        2630 :     if (unlikely(!memview || (PyObject *) memview == Py_None)) {
   35210         260 :         memslice->memview = NULL;
   35211         260 :         return;
   35212             :     }
   35213        2370 :     old_acquisition_count = __pyx_sub_acquisition_count(memview);
   35214        2370 :     memslice->data = NULL;
   35215        2370 :     if (likely(old_acquisition_count > 1)) {
   35216         406 :         memslice->memview = NULL;
   35217        1964 :     } else if (likely(old_acquisition_count == 1)) {
   35218        1964 :         if (have_gil) {
   35219        1964 :             Py_CLEAR(memslice->memview);
   35220             :         } else {
   35221           0 :             PyGILState_STATE _gilstate = PyGILState_Ensure();
   35222           0 :             Py_CLEAR(memslice->memview);
   35223           0 :             PyGILState_Release(_gilstate);
   35224             :         }
   35225             :     } else {
   35226           0 :         __pyx_fatalerror("Acquisition count is %d (line %d)",
   35227             :                          old_acquisition_count-1, lineno);
   35228             :     }
   35229             : }
   35230             : 
   35231             : /* CIntFromPy */
   35232         541 :   static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *x) {
   35233             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   35234             : #pragma GCC diagnostic push
   35235             : #pragma GCC diagnostic ignored "-Wconversion"
   35236             : #endif
   35237         541 :     const npy_int32 neg_one = (npy_int32) -1, const_zero = (npy_int32) 0;
   35238             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   35239             : #pragma GCC diagnostic pop
   35240             : #endif
   35241         541 :     const int is_unsigned = neg_one > const_zero;
   35242             : #if PY_MAJOR_VERSION < 3
   35243             :     if (likely(PyInt_Check(x))) {
   35244             :         if ((sizeof(npy_int32) < sizeof(long))) {
   35245             :             __PYX_VERIFY_RETURN_INT(npy_int32, long, PyInt_AS_LONG(x))
   35246             :         } else {
   35247             :             long val = PyInt_AS_LONG(x);
   35248             :             if (is_unsigned && unlikely(val < 0)) {
   35249             :                 goto raise_neg_overflow;
   35250             :             }
   35251             :             return (npy_int32) val;
   35252             :         }
   35253             :     }
   35254             : #endif
   35255         541 :     if (unlikely(!PyLong_Check(x))) {
   35256           0 :         npy_int32 val;
   35257           0 :         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
   35258           0 :         if (!tmp) return (npy_int32) -1;
   35259           0 :         val = __Pyx_PyInt_As_npy_int32(tmp);
   35260           0 :         Py_DECREF(tmp);
   35261           0 :         return val;
   35262             :     }
   35263         541 :     if (is_unsigned) {
   35264             : #if CYTHON_USE_PYLONG_INTERNALS
   35265             :         if (unlikely(__Pyx_PyLong_IsNeg(x))) {
   35266             :             goto raise_neg_overflow;
   35267             :         } else if (__Pyx_PyLong_IsCompact(x)) {
   35268             :             __PYX_VERIFY_RETURN_INT(npy_int32, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
   35269             :         } else {
   35270             :             const digit* digits = __Pyx_PyLong_Digits(x);
   35271             :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   35272             :             switch (__Pyx_PyLong_DigitCount(x)) {
   35273             :                 case 2:
   35274             :                     if ((8 * sizeof(npy_int32) > 1 * PyLong_SHIFT)) {
   35275             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   35276             :                             __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35277             :                         } else if ((8 * sizeof(npy_int32) >= 2 * PyLong_SHIFT)) {
   35278             :                             return (npy_int32) (((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]));
   35279             :                         }
   35280             :                     }
   35281             :                     break;
   35282             :                 case 3:
   35283             :                     if ((8 * sizeof(npy_int32) > 2 * PyLong_SHIFT)) {
   35284             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   35285             :                             __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35286             :                         } else if ((8 * sizeof(npy_int32) >= 3 * PyLong_SHIFT)) {
   35287             :                             return (npy_int32) (((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]));
   35288             :                         }
   35289             :                     }
   35290             :                     break;
   35291             :                 case 4:
   35292             :                     if ((8 * sizeof(npy_int32) > 3 * PyLong_SHIFT)) {
   35293             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   35294             :                             __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35295             :                         } else if ((8 * sizeof(npy_int32) >= 4 * PyLong_SHIFT)) {
   35296             :                             return (npy_int32) (((((((((npy_int32)digits[3]) << PyLong_SHIFT) | (npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]));
   35297             :                         }
   35298             :                     }
   35299             :                     break;
   35300             :             }
   35301             :         }
   35302             : #endif
   35303             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
   35304             :         if (unlikely(Py_SIZE(x) < 0)) {
   35305             :             goto raise_neg_overflow;
   35306             :         }
   35307             : #else
   35308             :         {
   35309             :             int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
   35310             :             if (unlikely(result < 0))
   35311             :                 return (npy_int32) -1;
   35312             :             if (unlikely(result == 1))
   35313             :                 goto raise_neg_overflow;
   35314             :         }
   35315             : #endif
   35316             :         if ((sizeof(npy_int32) <= sizeof(unsigned long))) {
   35317             :             __PYX_VERIFY_RETURN_INT_EXC(npy_int32, unsigned long, PyLong_AsUnsignedLong(x))
   35318             : #ifdef HAVE_LONG_LONG
   35319             :         } else if ((sizeof(npy_int32) <= sizeof(unsigned PY_LONG_LONG))) {
   35320             :             __PYX_VERIFY_RETURN_INT_EXC(npy_int32, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
   35321             : #endif
   35322             :         }
   35323             :     } else {
   35324             : #if CYTHON_USE_PYLONG_INTERNALS
   35325         541 :         if (__Pyx_PyLong_IsCompact(x)) {
   35326         406 :             __PYX_VERIFY_RETURN_INT(npy_int32, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
   35327             :         } else {
   35328         135 :             const digit* digits = __Pyx_PyLong_Digits(x);
   35329         135 :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   35330         135 :             switch (__Pyx_PyLong_SignedDigitCount(x)) {
   35331             :                 case -2:
   35332           0 :                     if ((8 * sizeof(npy_int32) - 1 > 1 * PyLong_SHIFT)) {
   35333           0 :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   35334           0 :                             __PYX_VERIFY_RETURN_INT(npy_int32, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35335             :                         } else if ((8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT)) {
   35336             :                             return (npy_int32) (((npy_int32)-1)*(((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])));
   35337             :                         }
   35338             :                     }
   35339             :                     break;
   35340             :                 case 2:
   35341         135 :                     if ((8 * sizeof(npy_int32) > 1 * PyLong_SHIFT)) {
   35342         135 :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   35343         135 :                             __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35344             :                         } else if ((8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT)) {
   35345             :                             return (npy_int32) ((((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])));
   35346             :                         }
   35347             :                     }
   35348             :                     break;
   35349             :                 case -3:
   35350             :                     if ((8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT)) {
   35351             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   35352             :                             __PYX_VERIFY_RETURN_INT(npy_int32, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35353             :                         } else if ((8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT)) {
   35354             :                             return (npy_int32) (((npy_int32)-1)*(((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])));
   35355             :                         }
   35356             :                     }
   35357             :                     break;
   35358             :                 case 3:
   35359             :                     if ((8 * sizeof(npy_int32) > 2 * PyLong_SHIFT)) {
   35360             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   35361             :                             __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35362             :                         } else if ((8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT)) {
   35363             :                             return (npy_int32) ((((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])));
   35364             :                         }
   35365             :                     }
   35366             :                     break;
   35367             :                 case -4:
   35368             :                     if ((8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT)) {
   35369             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   35370             :                             __PYX_VERIFY_RETURN_INT(npy_int32, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35371             :                         } else if ((8 * sizeof(npy_int32) - 1 > 4 * PyLong_SHIFT)) {
   35372             :                             return (npy_int32) (((npy_int32)-1)*(((((((((npy_int32)digits[3]) << PyLong_SHIFT) | (npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])));
   35373             :                         }
   35374             :                     }
   35375             :                     break;
   35376             :                 case 4:
   35377             :                     if ((8 * sizeof(npy_int32) > 3 * PyLong_SHIFT)) {
   35378             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   35379             :                             __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35380             :                         } else if ((8 * sizeof(npy_int32) - 1 > 4 * PyLong_SHIFT)) {
   35381             :                             return (npy_int32) ((((((((((npy_int32)digits[3]) << PyLong_SHIFT) | (npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])));
   35382             :                         }
   35383             :                     }
   35384             :                     break;
   35385             :             }
   35386             :         }
   35387             : #endif
   35388           0 :         if ((sizeof(npy_int32) <= sizeof(long))) {
   35389           0 :             __PYX_VERIFY_RETURN_INT_EXC(npy_int32, long, PyLong_AsLong(x))
   35390             : #ifdef HAVE_LONG_LONG
   35391             :         } else if ((sizeof(npy_int32) <= sizeof(PY_LONG_LONG))) {
   35392             :             __PYX_VERIFY_RETURN_INT_EXC(npy_int32, PY_LONG_LONG, PyLong_AsLongLong(x))
   35393             : #endif
   35394             :         }
   35395             :     }
   35396             :     {
   35397             :         npy_int32 val;
   35398             :         int ret = -1;
   35399             : #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
   35400             :         Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
   35401             :             x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
   35402             :         if (unlikely(bytes_copied == -1)) {
   35403             :         } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
   35404             :             goto raise_overflow;
   35405             :         } else {
   35406             :             ret = 0;
   35407             :         }
   35408             : #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
   35409             :         int one = 1; int is_little = (int)*(unsigned char *)&one;
   35410             :         unsigned char *bytes = (unsigned char *)&val;
   35411             :         ret = _PyLong_AsByteArray((PyLongObject *)x,
   35412             :                                     bytes, sizeof(val),
   35413             :                                     is_little, !is_unsigned);
   35414             : #else
   35415             :         PyObject *v;
   35416             :         PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
   35417             :         int bits, remaining_bits, is_negative = 0;
   35418             :         int chunk_size = (sizeof(long) < 8) ? 30 : 62;
   35419             :         if (likely(PyLong_CheckExact(x))) {
   35420             :             v = __Pyx_NewRef(x);
   35421             :         } else {
   35422             :             v = PyNumber_Long(x);
   35423             :             if (unlikely(!v)) return (npy_int32) -1;
   35424             :             assert(PyLong_CheckExact(v));
   35425             :         }
   35426             :         {
   35427             :             int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
   35428             :             if (unlikely(result < 0)) {
   35429             :                 Py_DECREF(v);
   35430             :                 return (npy_int32) -1;
   35431             :             }
   35432             :             is_negative = result == 1;
   35433             :         }
   35434             :         if (is_unsigned && unlikely(is_negative)) {
   35435             :             Py_DECREF(v);
   35436             :             goto raise_neg_overflow;
   35437             :         } else if (is_negative) {
   35438             :             stepval = PyNumber_Invert(v);
   35439             :             Py_DECREF(v);
   35440             :             if (unlikely(!stepval))
   35441             :                 return (npy_int32) -1;
   35442             :         } else {
   35443             :             stepval = v;
   35444             :         }
   35445             :         v = NULL;
   35446             :         val = (npy_int32) 0;
   35447             :         mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
   35448             :         shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
   35449             :         for (bits = 0; bits < (int) sizeof(npy_int32) * 8 - chunk_size; bits += chunk_size) {
   35450             :             PyObject *tmp, *digit;
   35451             :             long idigit;
   35452             :             digit = PyNumber_And(stepval, mask);
   35453             :             if (unlikely(!digit)) goto done;
   35454             :             idigit = PyLong_AsLong(digit);
   35455             :             Py_DECREF(digit);
   35456             :             if (unlikely(idigit < 0)) goto done;
   35457             :             val |= ((npy_int32) idigit) << bits;
   35458             :             tmp = PyNumber_Rshift(stepval, shift);
   35459             :             if (unlikely(!tmp)) goto done;
   35460             :             Py_DECREF(stepval); stepval = tmp;
   35461             :         }
   35462             :         Py_DECREF(shift); shift = NULL;
   35463             :         Py_DECREF(mask); mask = NULL;
   35464             :         {
   35465             :             long idigit = PyLong_AsLong(stepval);
   35466             :             if (unlikely(idigit < 0)) goto done;
   35467             :             remaining_bits = ((int) sizeof(npy_int32) * 8) - bits - (is_unsigned ? 0 : 1);
   35468             :             if (unlikely(idigit >= (1L << remaining_bits)))
   35469             :                 goto raise_overflow;
   35470             :             val |= ((npy_int32) idigit) << bits;
   35471             :         }
   35472             :         if (!is_unsigned) {
   35473             :             if (unlikely(val & (((npy_int32) 1) << (sizeof(npy_int32) * 8 - 1))))
   35474             :                 goto raise_overflow;
   35475             :             if (is_negative)
   35476             :                 val = ~val;
   35477             :         }
   35478             :         ret = 0;
   35479             :     done:
   35480             :         Py_XDECREF(shift);
   35481             :         Py_XDECREF(mask);
   35482             :         Py_XDECREF(stepval);
   35483             : #endif
   35484             :         if (unlikely(ret))
   35485             :             return (npy_int32) -1;
   35486             :         return val;
   35487             :     }
   35488           0 : raise_overflow:
   35489           0 :     PyErr_SetString(PyExc_OverflowError,
   35490             :         "value too large to convert to npy_int32");
   35491           0 :     return (npy_int32) -1;
   35492             : raise_neg_overflow:
   35493             :     PyErr_SetString(PyExc_OverflowError,
   35494             :         "can't convert negative value to npy_int32");
   35495             :     return (npy_int32) -1;
   35496             : }
   35497             : 
   35498             : /* CIntToPy */
   35499        1085 :   static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value) {
   35500             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   35501             : #pragma GCC diagnostic push
   35502             : #pragma GCC diagnostic ignored "-Wconversion"
   35503             : #endif
   35504        1085 :     const npy_int32 neg_one = (npy_int32) -1, const_zero = (npy_int32) 0;
   35505             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   35506             : #pragma GCC diagnostic pop
   35507             : #endif
   35508        1085 :     const int is_unsigned = neg_one > const_zero;
   35509        1085 :     if (is_unsigned) {
   35510             :         if (sizeof(npy_int32) < sizeof(long)) {
   35511             :             return PyInt_FromLong((long) value);
   35512             :         } else if (sizeof(npy_int32) <= sizeof(unsigned long)) {
   35513             :             return PyLong_FromUnsignedLong((unsigned long) value);
   35514             : #ifdef HAVE_LONG_LONG
   35515             :         } else if (sizeof(npy_int32) <= sizeof(unsigned PY_LONG_LONG)) {
   35516             :             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
   35517             : #endif
   35518             :         }
   35519             :     } else {
   35520        1085 :         if (sizeof(npy_int32) <= sizeof(long)) {
   35521        1085 :             return PyInt_FromLong((long) value);
   35522             : #ifdef HAVE_LONG_LONG
   35523             :         } else if (sizeof(npy_int32) <= sizeof(PY_LONG_LONG)) {
   35524             :             return PyLong_FromLongLong((PY_LONG_LONG) value);
   35525             : #endif
   35526             :         }
   35527             :     }
   35528             :     {
   35529             :         unsigned char *bytes = (unsigned char *)&value;
   35530             : #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
   35531             :         if (is_unsigned) {
   35532             :             return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
   35533             :         } else {
   35534             :             return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
   35535             :         }
   35536             : #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
   35537             :         int one = 1; int little = (int)*(unsigned char *)&one;
   35538             :         return _PyLong_FromByteArray(bytes, sizeof(npy_int32),
   35539             :                                      little, !is_unsigned);
   35540             : #else
   35541             :         int one = 1; int little = (int)*(unsigned char *)&one;
   35542             :         PyObject *from_bytes, *result = NULL;
   35543             :         PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
   35544             :         from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
   35545             :         if (!from_bytes) return NULL;
   35546             :         py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(npy_int32));
   35547             :         if (!py_bytes) goto limited_bad;
   35548             :         order_str = PyUnicode_FromString(little ? "little" : "big");
   35549             :         if (!order_str) goto limited_bad;
   35550             :         arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
   35551             :         if (!arg_tuple) goto limited_bad;
   35552             :         if (!is_unsigned) {
   35553             :             kwds = PyDict_New();
   35554             :             if (!kwds) goto limited_bad;
   35555             :             if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
   35556             :         }
   35557             :         result = PyObject_Call(from_bytes, arg_tuple, kwds);
   35558             :         limited_bad:
   35559             :         Py_XDECREF(kwds);
   35560             :         Py_XDECREF(arg_tuple);
   35561             :         Py_XDECREF(order_str);
   35562             :         Py_XDECREF(py_bytes);
   35563             :         Py_XDECREF(from_bytes);
   35564             :         return result;
   35565             : #endif
   35566             :     }
   35567             : }
   35568             : 
   35569             : /* CIntToPy */
   35570         405 :   static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
   35571             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   35572             : #pragma GCC diagnostic push
   35573             : #pragma GCC diagnostic ignored "-Wconversion"
   35574             : #endif
   35575         405 :     const long neg_one = (long) -1, const_zero = (long) 0;
   35576             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   35577             : #pragma GCC diagnostic pop
   35578             : #endif
   35579         405 :     const int is_unsigned = neg_one > const_zero;
   35580         405 :     if (is_unsigned) {
   35581             :         if (sizeof(long) < sizeof(long)) {
   35582             :             return PyInt_FromLong((long) value);
   35583             :         } else if (sizeof(long) <= sizeof(unsigned long)) {
   35584             :             return PyLong_FromUnsignedLong((unsigned long) value);
   35585             : #ifdef HAVE_LONG_LONG
   35586             :         } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
   35587             :             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
   35588             : #endif
   35589             :         }
   35590             :     } else {
   35591         405 :         if (sizeof(long) <= sizeof(long)) {
   35592         405 :             return PyInt_FromLong((long) value);
   35593             : #ifdef HAVE_LONG_LONG
   35594             :         } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
   35595             :             return PyLong_FromLongLong((PY_LONG_LONG) value);
   35596             : #endif
   35597             :         }
   35598             :     }
   35599             :     {
   35600             :         unsigned char *bytes = (unsigned char *)&value;
   35601             : #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
   35602             :         if (is_unsigned) {
   35603             :             return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
   35604             :         } else {
   35605             :             return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
   35606             :         }
   35607             : #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
   35608             :         int one = 1; int little = (int)*(unsigned char *)&one;
   35609             :         return _PyLong_FromByteArray(bytes, sizeof(long),
   35610             :                                      little, !is_unsigned);
   35611             : #else
   35612             :         int one = 1; int little = (int)*(unsigned char *)&one;
   35613             :         PyObject *from_bytes, *result = NULL;
   35614             :         PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
   35615             :         from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
   35616             :         if (!from_bytes) return NULL;
   35617             :         py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
   35618             :         if (!py_bytes) goto limited_bad;
   35619             :         order_str = PyUnicode_FromString(little ? "little" : "big");
   35620             :         if (!order_str) goto limited_bad;
   35621             :         arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
   35622             :         if (!arg_tuple) goto limited_bad;
   35623             :         if (!is_unsigned) {
   35624             :             kwds = PyDict_New();
   35625             :             if (!kwds) goto limited_bad;
   35626             :             if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
   35627             :         }
   35628             :         result = PyObject_Call(from_bytes, arg_tuple, kwds);
   35629             :         limited_bad:
   35630             :         Py_XDECREF(kwds);
   35631             :         Py_XDECREF(arg_tuple);
   35632             :         Py_XDECREF(order_str);
   35633             :         Py_XDECREF(py_bytes);
   35634             :         Py_XDECREF(from_bytes);
   35635             :         return result;
   35636             : #endif
   35637             :     }
   35638             : }
   35639             : 
   35640             : /* CIntFromPy */
   35641           0 :   static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
   35642             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   35643             : #pragma GCC diagnostic push
   35644             : #pragma GCC diagnostic ignored "-Wconversion"
   35645             : #endif
   35646           0 :     const long neg_one = (long) -1, const_zero = (long) 0;
   35647             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   35648             : #pragma GCC diagnostic pop
   35649             : #endif
   35650           0 :     const int is_unsigned = neg_one > const_zero;
   35651             : #if PY_MAJOR_VERSION < 3
   35652             :     if (likely(PyInt_Check(x))) {
   35653             :         if ((sizeof(long) < sizeof(long))) {
   35654             :             __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
   35655             :         } else {
   35656             :             long val = PyInt_AS_LONG(x);
   35657             :             if (is_unsigned && unlikely(val < 0)) {
   35658             :                 goto raise_neg_overflow;
   35659             :             }
   35660             :             return (long) val;
   35661             :         }
   35662             :     }
   35663             : #endif
   35664           0 :     if (unlikely(!PyLong_Check(x))) {
   35665           0 :         long val;
   35666           0 :         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
   35667           0 :         if (!tmp) return (long) -1;
   35668           0 :         val = __Pyx_PyInt_As_long(tmp);
   35669           0 :         Py_DECREF(tmp);
   35670           0 :         return val;
   35671             :     }
   35672           0 :     if (is_unsigned) {
   35673             : #if CYTHON_USE_PYLONG_INTERNALS
   35674             :         if (unlikely(__Pyx_PyLong_IsNeg(x))) {
   35675             :             goto raise_neg_overflow;
   35676             :         } else if (__Pyx_PyLong_IsCompact(x)) {
   35677             :             __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
   35678             :         } else {
   35679             :             const digit* digits = __Pyx_PyLong_Digits(x);
   35680             :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   35681             :             switch (__Pyx_PyLong_DigitCount(x)) {
   35682             :                 case 2:
   35683             :                     if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
   35684             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   35685             :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35686             :                         } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
   35687             :                             return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
   35688             :                         }
   35689             :                     }
   35690             :                     break;
   35691             :                 case 3:
   35692             :                     if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
   35693             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   35694             :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35695             :                         } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
   35696             :                             return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
   35697             :                         }
   35698             :                     }
   35699             :                     break;
   35700             :                 case 4:
   35701             :                     if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
   35702             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   35703             :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35704             :                         } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
   35705             :                             return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
   35706             :                         }
   35707             :                     }
   35708             :                     break;
   35709             :             }
   35710             :         }
   35711             : #endif
   35712             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
   35713             :         if (unlikely(Py_SIZE(x) < 0)) {
   35714             :             goto raise_neg_overflow;
   35715             :         }
   35716             : #else
   35717             :         {
   35718             :             int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
   35719             :             if (unlikely(result < 0))
   35720             :                 return (long) -1;
   35721             :             if (unlikely(result == 1))
   35722             :                 goto raise_neg_overflow;
   35723             :         }
   35724             : #endif
   35725             :         if ((sizeof(long) <= sizeof(unsigned long))) {
   35726             :             __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
   35727             : #ifdef HAVE_LONG_LONG
   35728             :         } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
   35729             :             __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
   35730             : #endif
   35731             :         }
   35732             :     } else {
   35733             : #if CYTHON_USE_PYLONG_INTERNALS
   35734           0 :         if (__Pyx_PyLong_IsCompact(x)) {
   35735           0 :             __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
   35736             :         } else {
   35737           0 :             const digit* digits = __Pyx_PyLong_Digits(x);
   35738           0 :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   35739           0 :             switch (__Pyx_PyLong_SignedDigitCount(x)) {
   35740             :                 case -2:
   35741           0 :                     if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
   35742           0 :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   35743           0 :                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35744             :                         } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
   35745             :                             return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   35746             :                         }
   35747             :                     }
   35748             :                     break;
   35749             :                 case 2:
   35750           0 :                     if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
   35751           0 :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   35752           0 :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35753             :                         } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
   35754             :                             return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   35755             :                         }
   35756             :                     }
   35757             :                     break;
   35758             :                 case -3:
   35759             :                     if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
   35760             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   35761             :                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35762             :                         } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
   35763             :                             return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   35764             :                         }
   35765             :                     }
   35766             :                     break;
   35767             :                 case 3:
   35768             :                     if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
   35769             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   35770             :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35771             :                         } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
   35772             :                             return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   35773             :                         }
   35774             :                     }
   35775             :                     break;
   35776             :                 case -4:
   35777             :                     if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
   35778             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   35779             :                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35780             :                         } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
   35781             :                             return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   35782             :                         }
   35783             :                     }
   35784             :                     break;
   35785             :                 case 4:
   35786             :                     if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
   35787             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   35788             :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35789             :                         } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
   35790             :                             return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   35791             :                         }
   35792             :                     }
   35793             :                     break;
   35794             :             }
   35795             :         }
   35796             : #endif
   35797           0 :         if ((sizeof(long) <= sizeof(long))) {
   35798           0 :             __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
   35799             : #ifdef HAVE_LONG_LONG
   35800             :         } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
   35801             :             __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
   35802             : #endif
   35803             :         }
   35804             :     }
   35805             :     {
   35806             :         long val;
   35807             :         int ret = -1;
   35808             : #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
   35809             :         Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
   35810             :             x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
   35811             :         if (unlikely(bytes_copied == -1)) {
   35812             :         } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
   35813             :             goto raise_overflow;
   35814             :         } else {
   35815             :             ret = 0;
   35816             :         }
   35817             : #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
   35818             :         int one = 1; int is_little = (int)*(unsigned char *)&one;
   35819             :         unsigned char *bytes = (unsigned char *)&val;
   35820             :         ret = _PyLong_AsByteArray((PyLongObject *)x,
   35821             :                                     bytes, sizeof(val),
   35822             :                                     is_little, !is_unsigned);
   35823             : #else
   35824             :         PyObject *v;
   35825             :         PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
   35826             :         int bits, remaining_bits, is_negative = 0;
   35827             :         int chunk_size = (sizeof(long) < 8) ? 30 : 62;
   35828             :         if (likely(PyLong_CheckExact(x))) {
   35829             :             v = __Pyx_NewRef(x);
   35830             :         } else {
   35831             :             v = PyNumber_Long(x);
   35832             :             if (unlikely(!v)) return (long) -1;
   35833             :             assert(PyLong_CheckExact(v));
   35834             :         }
   35835             :         {
   35836             :             int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
   35837             :             if (unlikely(result < 0)) {
   35838             :                 Py_DECREF(v);
   35839             :                 return (long) -1;
   35840             :             }
   35841             :             is_negative = result == 1;
   35842             :         }
   35843             :         if (is_unsigned && unlikely(is_negative)) {
   35844             :             Py_DECREF(v);
   35845             :             goto raise_neg_overflow;
   35846             :         } else if (is_negative) {
   35847             :             stepval = PyNumber_Invert(v);
   35848             :             Py_DECREF(v);
   35849             :             if (unlikely(!stepval))
   35850             :                 return (long) -1;
   35851             :         } else {
   35852             :             stepval = v;
   35853             :         }
   35854             :         v = NULL;
   35855             :         val = (long) 0;
   35856             :         mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
   35857             :         shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
   35858             :         for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
   35859             :             PyObject *tmp, *digit;
   35860             :             long idigit;
   35861             :             digit = PyNumber_And(stepval, mask);
   35862             :             if (unlikely(!digit)) goto done;
   35863             :             idigit = PyLong_AsLong(digit);
   35864             :             Py_DECREF(digit);
   35865             :             if (unlikely(idigit < 0)) goto done;
   35866             :             val |= ((long) idigit) << bits;
   35867             :             tmp = PyNumber_Rshift(stepval, shift);
   35868             :             if (unlikely(!tmp)) goto done;
   35869             :             Py_DECREF(stepval); stepval = tmp;
   35870             :         }
   35871             :         Py_DECREF(shift); shift = NULL;
   35872             :         Py_DECREF(mask); mask = NULL;
   35873             :         {
   35874             :             long idigit = PyLong_AsLong(stepval);
   35875             :             if (unlikely(idigit < 0)) goto done;
   35876             :             remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
   35877             :             if (unlikely(idigit >= (1L << remaining_bits)))
   35878             :                 goto raise_overflow;
   35879             :             val |= ((long) idigit) << bits;
   35880             :         }
   35881             :         if (!is_unsigned) {
   35882             :             if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
   35883             :                 goto raise_overflow;
   35884             :             if (is_negative)
   35885             :                 val = ~val;
   35886             :         }
   35887             :         ret = 0;
   35888             :     done:
   35889             :         Py_XDECREF(shift);
   35890             :         Py_XDECREF(mask);
   35891             :         Py_XDECREF(stepval);
   35892             : #endif
   35893             :         if (unlikely(ret))
   35894             :             return (long) -1;
   35895             :         return val;
   35896             :     }
   35897             : raise_overflow:
   35898             :     PyErr_SetString(PyExc_OverflowError,
   35899             :         "value too large to convert to long");
   35900             :     return (long) -1;
   35901             : raise_neg_overflow:
   35902             :     PyErr_SetString(PyExc_OverflowError,
   35903             :         "can't convert negative value to long");
   35904             :     return (long) -1;
   35905             : }
   35906             : 
   35907             : /* CIntFromPy */
   35908        2302 :   static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
   35909             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   35910             : #pragma GCC diagnostic push
   35911             : #pragma GCC diagnostic ignored "-Wconversion"
   35912             : #endif
   35913        2302 :     const int neg_one = (int) -1, const_zero = (int) 0;
   35914             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   35915             : #pragma GCC diagnostic pop
   35916             : #endif
   35917        2302 :     const int is_unsigned = neg_one > const_zero;
   35918             : #if PY_MAJOR_VERSION < 3
   35919             :     if (likely(PyInt_Check(x))) {
   35920             :         if ((sizeof(int) < sizeof(long))) {
   35921             :             __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
   35922             :         } else {
   35923             :             long val = PyInt_AS_LONG(x);
   35924             :             if (is_unsigned && unlikely(val < 0)) {
   35925             :                 goto raise_neg_overflow;
   35926             :             }
   35927             :             return (int) val;
   35928             :         }
   35929             :     }
   35930             : #endif
   35931        2302 :     if (unlikely(!PyLong_Check(x))) {
   35932           0 :         int val;
   35933           0 :         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
   35934           0 :         if (!tmp) return (int) -1;
   35935           0 :         val = __Pyx_PyInt_As_int(tmp);
   35936           0 :         Py_DECREF(tmp);
   35937           0 :         return val;
   35938             :     }
   35939        2302 :     if (is_unsigned) {
   35940             : #if CYTHON_USE_PYLONG_INTERNALS
   35941             :         if (unlikely(__Pyx_PyLong_IsNeg(x))) {
   35942             :             goto raise_neg_overflow;
   35943             :         } else if (__Pyx_PyLong_IsCompact(x)) {
   35944             :             __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
   35945             :         } else {
   35946             :             const digit* digits = __Pyx_PyLong_Digits(x);
   35947             :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   35948             :             switch (__Pyx_PyLong_DigitCount(x)) {
   35949             :                 case 2:
   35950             :                     if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
   35951             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   35952             :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35953             :                         } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
   35954             :                             return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
   35955             :                         }
   35956             :                     }
   35957             :                     break;
   35958             :                 case 3:
   35959             :                     if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
   35960             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   35961             :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35962             :                         } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
   35963             :                             return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
   35964             :                         }
   35965             :                     }
   35966             :                     break;
   35967             :                 case 4:
   35968             :                     if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
   35969             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   35970             :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   35971             :                         } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
   35972             :                             return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
   35973             :                         }
   35974             :                     }
   35975             :                     break;
   35976             :             }
   35977             :         }
   35978             : #endif
   35979             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
   35980             :         if (unlikely(Py_SIZE(x) < 0)) {
   35981             :             goto raise_neg_overflow;
   35982             :         }
   35983             : #else
   35984             :         {
   35985             :             int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
   35986             :             if (unlikely(result < 0))
   35987             :                 return (int) -1;
   35988             :             if (unlikely(result == 1))
   35989             :                 goto raise_neg_overflow;
   35990             :         }
   35991             : #endif
   35992             :         if ((sizeof(int) <= sizeof(unsigned long))) {
   35993             :             __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
   35994             : #ifdef HAVE_LONG_LONG
   35995             :         } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
   35996             :             __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
   35997             : #endif
   35998             :         }
   35999             :     } else {
   36000             : #if CYTHON_USE_PYLONG_INTERNALS
   36001        2302 :         if (__Pyx_PyLong_IsCompact(x)) {
   36002        2302 :             __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
   36003             :         } else {
   36004           0 :             const digit* digits = __Pyx_PyLong_Digits(x);
   36005           0 :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   36006           0 :             switch (__Pyx_PyLong_SignedDigitCount(x)) {
   36007             :                 case -2:
   36008           0 :                     if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
   36009           0 :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   36010           0 :                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   36011             :                         } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
   36012             :                             return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   36013             :                         }
   36014             :                     }
   36015             :                     break;
   36016             :                 case 2:
   36017           0 :                     if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
   36018           0 :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   36019           0 :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   36020             :                         } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
   36021             :                             return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   36022             :                         }
   36023             :                     }
   36024             :                     break;
   36025             :                 case -3:
   36026             :                     if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
   36027             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   36028             :                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   36029             :                         } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
   36030             :                             return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   36031             :                         }
   36032             :                     }
   36033             :                     break;
   36034             :                 case 3:
   36035             :                     if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
   36036             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   36037             :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   36038             :                         } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
   36039             :                             return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   36040             :                         }
   36041             :                     }
   36042             :                     break;
   36043             :                 case -4:
   36044             :                     if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
   36045             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   36046             :                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   36047             :                         } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
   36048             :                             return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   36049             :                         }
   36050             :                     }
   36051             :                     break;
   36052             :                 case 4:
   36053             :                     if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
   36054             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   36055             :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   36056             :                         } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
   36057             :                             return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   36058             :                         }
   36059             :                     }
   36060             :                     break;
   36061             :             }
   36062             :         }
   36063             : #endif
   36064           0 :         if ((sizeof(int) <= sizeof(long))) {
   36065           0 :             __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
   36066             : #ifdef HAVE_LONG_LONG
   36067             :         } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
   36068             :             __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
   36069             : #endif
   36070             :         }
   36071             :     }
   36072             :     {
   36073             :         int val;
   36074             :         int ret = -1;
   36075             : #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
   36076             :         Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
   36077             :             x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
   36078             :         if (unlikely(bytes_copied == -1)) {
   36079             :         } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
   36080             :             goto raise_overflow;
   36081             :         } else {
   36082             :             ret = 0;
   36083             :         }
   36084             : #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
   36085             :         int one = 1; int is_little = (int)*(unsigned char *)&one;
   36086             :         unsigned char *bytes = (unsigned char *)&val;
   36087             :         ret = _PyLong_AsByteArray((PyLongObject *)x,
   36088             :                                     bytes, sizeof(val),
   36089             :                                     is_little, !is_unsigned);
   36090             : #else
   36091             :         PyObject *v;
   36092             :         PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
   36093             :         int bits, remaining_bits, is_negative = 0;
   36094             :         int chunk_size = (sizeof(long) < 8) ? 30 : 62;
   36095             :         if (likely(PyLong_CheckExact(x))) {
   36096             :             v = __Pyx_NewRef(x);
   36097             :         } else {
   36098             :             v = PyNumber_Long(x);
   36099             :             if (unlikely(!v)) return (int) -1;
   36100             :             assert(PyLong_CheckExact(v));
   36101             :         }
   36102             :         {
   36103             :             int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
   36104             :             if (unlikely(result < 0)) {
   36105             :                 Py_DECREF(v);
   36106             :                 return (int) -1;
   36107             :             }
   36108             :             is_negative = result == 1;
   36109             :         }
   36110             :         if (is_unsigned && unlikely(is_negative)) {
   36111             :             Py_DECREF(v);
   36112             :             goto raise_neg_overflow;
   36113             :         } else if (is_negative) {
   36114             :             stepval = PyNumber_Invert(v);
   36115             :             Py_DECREF(v);
   36116             :             if (unlikely(!stepval))
   36117             :                 return (int) -1;
   36118             :         } else {
   36119             :             stepval = v;
   36120             :         }
   36121             :         v = NULL;
   36122             :         val = (int) 0;
   36123             :         mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
   36124             :         shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
   36125             :         for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
   36126             :             PyObject *tmp, *digit;
   36127             :             long idigit;
   36128             :             digit = PyNumber_And(stepval, mask);
   36129             :             if (unlikely(!digit)) goto done;
   36130             :             idigit = PyLong_AsLong(digit);
   36131             :             Py_DECREF(digit);
   36132             :             if (unlikely(idigit < 0)) goto done;
   36133             :             val |= ((int) idigit) << bits;
   36134             :             tmp = PyNumber_Rshift(stepval, shift);
   36135             :             if (unlikely(!tmp)) goto done;
   36136             :             Py_DECREF(stepval); stepval = tmp;
   36137             :         }
   36138             :         Py_DECREF(shift); shift = NULL;
   36139             :         Py_DECREF(mask); mask = NULL;
   36140             :         {
   36141             :             long idigit = PyLong_AsLong(stepval);
   36142             :             if (unlikely(idigit < 0)) goto done;
   36143             :             remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
   36144             :             if (unlikely(idigit >= (1L << remaining_bits)))
   36145             :                 goto raise_overflow;
   36146             :             val |= ((int) idigit) << bits;
   36147             :         }
   36148             :         if (!is_unsigned) {
   36149             :             if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
   36150             :                 goto raise_overflow;
   36151             :             if (is_negative)
   36152             :                 val = ~val;
   36153             :         }
   36154             :         ret = 0;
   36155             :     done:
   36156             :         Py_XDECREF(shift);
   36157             :         Py_XDECREF(mask);
   36158             :         Py_XDECREF(stepval);
   36159             : #endif
   36160             :         if (unlikely(ret))
   36161             :             return (int) -1;
   36162             :         return val;
   36163             :     }
   36164           0 : raise_overflow:
   36165           0 :     PyErr_SetString(PyExc_OverflowError,
   36166             :         "value too large to convert to int");
   36167           0 :     return (int) -1;
   36168             : raise_neg_overflow:
   36169             :     PyErr_SetString(PyExc_OverflowError,
   36170             :         "can't convert negative value to int");
   36171             :     return (int) -1;
   36172             : }
   36173             : 
   36174             : /* CIntToPy */
   36175        1964 :   static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
   36176             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   36177             : #pragma GCC diagnostic push
   36178             : #pragma GCC diagnostic ignored "-Wconversion"
   36179             : #endif
   36180        1964 :     const int neg_one = (int) -1, const_zero = (int) 0;
   36181             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   36182             : #pragma GCC diagnostic pop
   36183             : #endif
   36184        1964 :     const int is_unsigned = neg_one > const_zero;
   36185        1964 :     if (is_unsigned) {
   36186             :         if (sizeof(int) < sizeof(long)) {
   36187             :             return PyInt_FromLong((long) value);
   36188             :         } else if (sizeof(int) <= sizeof(unsigned long)) {
   36189             :             return PyLong_FromUnsignedLong((unsigned long) value);
   36190             : #ifdef HAVE_LONG_LONG
   36191             :         } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
   36192             :             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
   36193             : #endif
   36194             :         }
   36195             :     } else {
   36196        1964 :         if (sizeof(int) <= sizeof(long)) {
   36197        1964 :             return PyInt_FromLong((long) value);
   36198             : #ifdef HAVE_LONG_LONG
   36199             :         } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
   36200             :             return PyLong_FromLongLong((PY_LONG_LONG) value);
   36201             : #endif
   36202             :         }
   36203             :     }
   36204             :     {
   36205             :         unsigned char *bytes = (unsigned char *)&value;
   36206             : #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
   36207             :         if (is_unsigned) {
   36208             :             return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
   36209             :         } else {
   36210             :             return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
   36211             :         }
   36212             : #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
   36213             :         int one = 1; int little = (int)*(unsigned char *)&one;
   36214             :         return _PyLong_FromByteArray(bytes, sizeof(int),
   36215             :                                      little, !is_unsigned);
   36216             : #else
   36217             :         int one = 1; int little = (int)*(unsigned char *)&one;
   36218             :         PyObject *from_bytes, *result = NULL;
   36219             :         PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
   36220             :         from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
   36221             :         if (!from_bytes) return NULL;
   36222             :         py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
   36223             :         if (!py_bytes) goto limited_bad;
   36224             :         order_str = PyUnicode_FromString(little ? "little" : "big");
   36225             :         if (!order_str) goto limited_bad;
   36226             :         arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
   36227             :         if (!arg_tuple) goto limited_bad;
   36228             :         if (!is_unsigned) {
   36229             :             kwds = PyDict_New();
   36230             :             if (!kwds) goto limited_bad;
   36231             :             if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
   36232             :         }
   36233             :         result = PyObject_Call(from_bytes, arg_tuple, kwds);
   36234             :         limited_bad:
   36235             :         Py_XDECREF(kwds);
   36236             :         Py_XDECREF(arg_tuple);
   36237             :         Py_XDECREF(order_str);
   36238             :         Py_XDECREF(py_bytes);
   36239             :         Py_XDECREF(from_bytes);
   36240             :         return result;
   36241             : #endif
   36242             :     }
   36243             : }
   36244             : 
   36245             : /* CIntFromPy */
   36246             :   static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
   36247             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   36248             : #pragma GCC diagnostic push
   36249             : #pragma GCC diagnostic ignored "-Wconversion"
   36250             : #endif
   36251             :     const char neg_one = (char) -1, const_zero = (char) 0;
   36252             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   36253             : #pragma GCC diagnostic pop
   36254             : #endif
   36255             :     const int is_unsigned = neg_one > const_zero;
   36256             : #if PY_MAJOR_VERSION < 3
   36257             :     if (likely(PyInt_Check(x))) {
   36258             :         if ((sizeof(char) < sizeof(long))) {
   36259             :             __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
   36260             :         } else {
   36261             :             long val = PyInt_AS_LONG(x);
   36262             :             if (is_unsigned && unlikely(val < 0)) {
   36263             :                 goto raise_neg_overflow;
   36264             :             }
   36265             :             return (char) val;
   36266             :         }
   36267             :     }
   36268             : #endif
   36269             :     if (unlikely(!PyLong_Check(x))) {
   36270             :         char val;
   36271             :         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
   36272             :         if (!tmp) return (char) -1;
   36273             :         val = __Pyx_PyInt_As_char(tmp);
   36274             :         Py_DECREF(tmp);
   36275             :         return val;
   36276             :     }
   36277             :     if (is_unsigned) {
   36278             : #if CYTHON_USE_PYLONG_INTERNALS
   36279             :         if (unlikely(__Pyx_PyLong_IsNeg(x))) {
   36280             :             goto raise_neg_overflow;
   36281             :         } else if (__Pyx_PyLong_IsCompact(x)) {
   36282             :             __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
   36283             :         } else {
   36284             :             const digit* digits = __Pyx_PyLong_Digits(x);
   36285             :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   36286             :             switch (__Pyx_PyLong_DigitCount(x)) {
   36287             :                 case 2:
   36288             :                     if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) {
   36289             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   36290             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   36291             :                         } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) {
   36292             :                             return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
   36293             :                         }
   36294             :                     }
   36295             :                     break;
   36296             :                 case 3:
   36297             :                     if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) {
   36298             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   36299             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   36300             :                         } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) {
   36301             :                             return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
   36302             :                         }
   36303             :                     }
   36304             :                     break;
   36305             :                 case 4:
   36306             :                     if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) {
   36307             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   36308             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   36309             :                         } else if ((8 * sizeof(char) >= 4 * PyLong_SHIFT)) {
   36310             :                             return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
   36311             :                         }
   36312             :                     }
   36313             :                     break;
   36314             :             }
   36315             :         }
   36316             : #endif
   36317             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
   36318             :         if (unlikely(Py_SIZE(x) < 0)) {
   36319             :             goto raise_neg_overflow;
   36320             :         }
   36321             : #else
   36322             :         {
   36323             :             int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
   36324             :             if (unlikely(result < 0))
   36325             :                 return (char) -1;
   36326             :             if (unlikely(result == 1))
   36327             :                 goto raise_neg_overflow;
   36328             :         }
   36329             : #endif
   36330             :         if ((sizeof(char) <= sizeof(unsigned long))) {
   36331             :             __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
   36332             : #ifdef HAVE_LONG_LONG
   36333             :         } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) {
   36334             :             __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
   36335             : #endif
   36336             :         }
   36337             :     } else {
   36338             : #if CYTHON_USE_PYLONG_INTERNALS
   36339             :         if (__Pyx_PyLong_IsCompact(x)) {
   36340             :             __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
   36341             :         } else {
   36342             :             const digit* digits = __Pyx_PyLong_Digits(x);
   36343             :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   36344             :             switch (__Pyx_PyLong_SignedDigitCount(x)) {
   36345             :                 case -2:
   36346             :                     if ((8 * sizeof(char) - 1 > 1 * PyLong_SHIFT)) {
   36347             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   36348             :                             __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   36349             :                         } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
   36350             :                             return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   36351             :                         }
   36352             :                     }
   36353             :                     break;
   36354             :                 case 2:
   36355             :                     if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) {
   36356             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   36357             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   36358             :                         } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
   36359             :                             return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   36360             :                         }
   36361             :                     }
   36362             :                     break;
   36363             :                 case -3:
   36364             :                     if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
   36365             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   36366             :                             __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   36367             :                         } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
   36368             :                             return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   36369             :                         }
   36370             :                     }
   36371             :                     break;
   36372             :                 case 3:
   36373             :                     if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) {
   36374             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   36375             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   36376             :                         } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
   36377             :                             return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   36378             :                         }
   36379             :                     }
   36380             :                     break;
   36381             :                 case -4:
   36382             :                     if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
   36383             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   36384             :                             __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   36385             :                         } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) {
   36386             :                             return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   36387             :                         }
   36388             :                     }
   36389             :                     break;
   36390             :                 case 4:
   36391             :                     if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) {
   36392             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   36393             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   36394             :                         } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) {
   36395             :                             return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   36396             :                         }
   36397             :                     }
   36398             :                     break;
   36399             :             }
   36400             :         }
   36401             : #endif
   36402             :         if ((sizeof(char) <= sizeof(long))) {
   36403             :             __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
   36404             : #ifdef HAVE_LONG_LONG
   36405             :         } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) {
   36406             :             __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
   36407             : #endif
   36408             :         }
   36409             :     }
   36410             :     {
   36411             :         char val;
   36412             :         int ret = -1;
   36413             : #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
   36414             :         Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
   36415             :             x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
   36416             :         if (unlikely(bytes_copied == -1)) {
   36417             :         } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
   36418             :             goto raise_overflow;
   36419             :         } else {
   36420             :             ret = 0;
   36421             :         }
   36422             : #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
   36423             :         int one = 1; int is_little = (int)*(unsigned char *)&one;
   36424             :         unsigned char *bytes = (unsigned char *)&val;
   36425             :         ret = _PyLong_AsByteArray((PyLongObject *)x,
   36426             :                                     bytes, sizeof(val),
   36427             :                                     is_little, !is_unsigned);
   36428             : #else
   36429             :         PyObject *v;
   36430             :         PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
   36431             :         int bits, remaining_bits, is_negative = 0;
   36432             :         int chunk_size = (sizeof(long) < 8) ? 30 : 62;
   36433             :         if (likely(PyLong_CheckExact(x))) {
   36434             :             v = __Pyx_NewRef(x);
   36435             :         } else {
   36436             :             v = PyNumber_Long(x);
   36437             :             if (unlikely(!v)) return (char) -1;
   36438             :             assert(PyLong_CheckExact(v));
   36439             :         }
   36440             :         {
   36441             :             int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
   36442             :             if (unlikely(result < 0)) {
   36443             :                 Py_DECREF(v);
   36444             :                 return (char) -1;
   36445             :             }
   36446             :             is_negative = result == 1;
   36447             :         }
   36448             :         if (is_unsigned && unlikely(is_negative)) {
   36449             :             Py_DECREF(v);
   36450             :             goto raise_neg_overflow;
   36451             :         } else if (is_negative) {
   36452             :             stepval = PyNumber_Invert(v);
   36453             :             Py_DECREF(v);
   36454             :             if (unlikely(!stepval))
   36455             :                 return (char) -1;
   36456             :         } else {
   36457             :             stepval = v;
   36458             :         }
   36459             :         v = NULL;
   36460             :         val = (char) 0;
   36461             :         mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
   36462             :         shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
   36463             :         for (bits = 0; bits < (int) sizeof(char) * 8 - chunk_size; bits += chunk_size) {
   36464             :             PyObject *tmp, *digit;
   36465             :             long idigit;
   36466             :             digit = PyNumber_And(stepval, mask);
   36467             :             if (unlikely(!digit)) goto done;
   36468             :             idigit = PyLong_AsLong(digit);
   36469             :             Py_DECREF(digit);
   36470             :             if (unlikely(idigit < 0)) goto done;
   36471             :             val |= ((char) idigit) << bits;
   36472             :             tmp = PyNumber_Rshift(stepval, shift);
   36473             :             if (unlikely(!tmp)) goto done;
   36474             :             Py_DECREF(stepval); stepval = tmp;
   36475             :         }
   36476             :         Py_DECREF(shift); shift = NULL;
   36477             :         Py_DECREF(mask); mask = NULL;
   36478             :         {
   36479             :             long idigit = PyLong_AsLong(stepval);
   36480             :             if (unlikely(idigit < 0)) goto done;
   36481             :             remaining_bits = ((int) sizeof(char) * 8) - bits - (is_unsigned ? 0 : 1);
   36482             :             if (unlikely(idigit >= (1L << remaining_bits)))
   36483             :                 goto raise_overflow;
   36484             :             val |= ((char) idigit) << bits;
   36485             :         }
   36486             :         if (!is_unsigned) {
   36487             :             if (unlikely(val & (((char) 1) << (sizeof(char) * 8 - 1))))
   36488             :                 goto raise_overflow;
   36489             :             if (is_negative)
   36490             :                 val = ~val;
   36491             :         }
   36492             :         ret = 0;
   36493             :     done:
   36494             :         Py_XDECREF(shift);
   36495             :         Py_XDECREF(mask);
   36496             :         Py_XDECREF(stepval);
   36497             : #endif
   36498             :         if (unlikely(ret))
   36499             :             return (char) -1;
   36500             :         return val;
   36501             :     }
   36502             : raise_overflow:
   36503             :     PyErr_SetString(PyExc_OverflowError,
   36504             :         "value too large to convert to char");
   36505             :     return (char) -1;
   36506             : raise_neg_overflow:
   36507             :     PyErr_SetString(PyExc_OverflowError,
   36508             :         "can't convert negative value to char");
   36509             :     return (char) -1;
   36510             : }
   36511             : 
   36512             : /* FormatTypeName */
   36513             :   #if CYTHON_COMPILING_IN_LIMITED_API
   36514             : static __Pyx_TypeName
   36515             : __Pyx_PyType_GetName(PyTypeObject* tp)
   36516             : {
   36517             :     PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
   36518             :                                                __pyx_n_s_name_2);
   36519             :     if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
   36520             :         PyErr_Clear();
   36521             :         Py_XDECREF(name);
   36522             :         name = __Pyx_NewRef(__pyx_n_s__32);
   36523             :     }
   36524             :     return name;
   36525             : }
   36526             : #endif
   36527             : 
   36528             : /* CheckBinaryVersion */
   36529           3 :   static unsigned long __Pyx_get_runtime_version(void) {
   36530             : #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4
   36531           3 :     return Py_Version & ~0xFFUL;
   36532             : #else
   36533             :     const char* rt_version = Py_GetVersion();
   36534             :     unsigned long version = 0;
   36535             :     unsigned long factor = 0x01000000UL;
   36536             :     unsigned int digit = 0;
   36537             :     int i = 0;
   36538             :     while (factor) {
   36539             :         while ('0' <= rt_version[i] && rt_version[i] <= '9') {
   36540             :             digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
   36541             :             ++i;
   36542             :         }
   36543             :         version += factor * digit;
   36544             :         if (rt_version[i] != '.')
   36545             :             break;
   36546             :         digit = 0;
   36547             :         factor >>= 8;
   36548             :         ++i;
   36549             :     }
   36550             :     return version;
   36551             : #endif
   36552             : }
   36553           3 : static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
   36554           3 :     const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
   36555           3 :     if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
   36556             :         return 0;
   36557           0 :     if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
   36558             :         return 1;
   36559             :     {
   36560           0 :         char message[200];
   36561           0 :         PyOS_snprintf(message, sizeof(message),
   36562             :                       "compile time Python version %d.%d "
   36563             :                       "of module '%.100s' "
   36564             :                       "%s "
   36565             :                       "runtime version %d.%d",
   36566           0 :                        (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
   36567             :                        __Pyx_MODULE_NAME,
   36568             :                        (allow_newer) ? "was newer than" : "does not match",
   36569           0 :                        (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
   36570             :        );
   36571           0 :         return PyErr_WarnEx(NULL, message, 1);
   36572             :     }
   36573             : }
   36574             : 
   36575             : /* InitStrings */
   36576             :   #if PY_MAJOR_VERSION >= 3
   36577         579 : static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
   36578         579 :     if (t.is_unicode | t.is_str) {
   36579         576 :         if (t.intern) {
   36580         414 :             *str = PyUnicode_InternFromString(t.s);
   36581         162 :         } else if (t.encoding) {
   36582           0 :             *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
   36583             :         } else {
   36584         162 :             *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
   36585             :         }
   36586             :     } else {
   36587           3 :         *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
   36588             :     }
   36589         579 :     if (!*str)
   36590             :         return -1;
   36591         579 :     if (PyObject_Hash(*str) == -1)
   36592             :         return -1;
   36593             :     return 0;
   36594             : }
   36595             : #endif
   36596           3 : static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
   36597         582 :     while (t->p) {
   36598             :         #if PY_MAJOR_VERSION >= 3
   36599         579 :         __Pyx_InitString(*t, t->p);
   36600             :         #else
   36601             :         if (t->is_unicode) {
   36602             :             *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
   36603             :         } else if (t->intern) {
   36604             :             *t->p = PyString_InternFromString(t->s);
   36605             :         } else {
   36606             :             *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
   36607             :         }
   36608             :         if (!*t->p)
   36609             :             return -1;
   36610             :         if (PyObject_Hash(*t->p) == -1)
   36611             :             return -1;
   36612             :         #endif
   36613         579 :         ++t;
   36614             :     }
   36615           3 :     return 0;
   36616             : }
   36617             : 
   36618             : #include <string.h>
   36619           0 : static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
   36620           0 :     size_t len = strlen(s);
   36621           0 :     if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
   36622             :         PyErr_SetString(PyExc_OverflowError, "byte string is too long");
   36623             :         return -1;
   36624             :     }
   36625             :     return (Py_ssize_t) len;
   36626             : }
   36627             : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
   36628             :     Py_ssize_t len = __Pyx_ssize_strlen(c_str);
   36629             :     if (unlikely(len < 0)) return NULL;
   36630             :     return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
   36631             : }
   36632             : static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
   36633             :     Py_ssize_t len = __Pyx_ssize_strlen(c_str);
   36634             :     if (unlikely(len < 0)) return NULL;
   36635             :     return PyByteArray_FromStringAndSize(c_str, len);
   36636             : }
   36637             : static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
   36638             :     Py_ssize_t ignore;
   36639             :     return __Pyx_PyObject_AsStringAndSize(o, &ignore);
   36640             : }
   36641             : #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
   36642             : #if !CYTHON_PEP393_ENABLED
   36643             : static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
   36644             :     char* defenc_c;
   36645             :     PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
   36646             :     if (!defenc) return NULL;
   36647             :     defenc_c = PyBytes_AS_STRING(defenc);
   36648             : #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
   36649             :     {
   36650             :         char* end = defenc_c + PyBytes_GET_SIZE(defenc);
   36651             :         char* c;
   36652             :         for (c = defenc_c; c < end; c++) {
   36653             :             if ((unsigned char) (*c) >= 128) {
   36654             :                 PyUnicode_AsASCIIString(o);
   36655             :                 return NULL;
   36656             :             }
   36657             :         }
   36658             :     }
   36659             : #endif
   36660             :     *length = PyBytes_GET_SIZE(defenc);
   36661             :     return defenc_c;
   36662             : }
   36663             : #else
   36664             : static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
   36665             :     if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
   36666             : #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
   36667             :     if (likely(PyUnicode_IS_ASCII(o))) {
   36668             :         *length = PyUnicode_GET_LENGTH(o);
   36669             :         return PyUnicode_AsUTF8(o);
   36670             :     } else {
   36671             :         PyUnicode_AsASCIIString(o);
   36672             :         return NULL;
   36673             :     }
   36674             : #else
   36675             :     return PyUnicode_AsUTF8AndSize(o, length);
   36676             : #endif
   36677             : }
   36678             : #endif
   36679             : #endif
   36680             : static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
   36681             : #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
   36682             :     if (
   36683             : #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
   36684             :             __Pyx_sys_getdefaultencoding_not_ascii &&
   36685             : #endif
   36686             :             PyUnicode_Check(o)) {
   36687             :         return __Pyx_PyUnicode_AsStringAndSize(o, length);
   36688             :     } else
   36689             : #endif
   36690             : #if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
   36691             :     if (PyByteArray_Check(o)) {
   36692             :         *length = PyByteArray_GET_SIZE(o);
   36693             :         return PyByteArray_AS_STRING(o);
   36694             :     } else
   36695             : #endif
   36696             :     {
   36697             :         char* result;
   36698             :         int r = PyBytes_AsStringAndSize(o, &result, length);
   36699             :         if (unlikely(r < 0)) {
   36700             :             return NULL;
   36701             :         } else {
   36702             :             return result;
   36703             :         }
   36704             :     }
   36705             : }
   36706        3116 : static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   36707        3116 :    int is_true = x == Py_True;
   36708        3116 :    if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   36709         225 :    else return PyObject_IsTrue(x);
   36710             : }
   36711             : static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
   36712             :     int retval;
   36713             :     if (unlikely(!x)) return -1;
   36714             :     retval = __Pyx_PyObject_IsTrue(x);
   36715             :     Py_DECREF(x);
   36716             :     return retval;
   36717             : }
   36718           0 : static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
   36719           0 :     __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
   36720             : #if PY_MAJOR_VERSION >= 3
   36721           0 :     if (PyLong_Check(result)) {
   36722           0 :         if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
   36723             :                 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
   36724             :                 "The ability to return an instance of a strict subclass of int is deprecated, "
   36725             :                 "and may be removed in a future version of Python.",
   36726             :                 result_type_name)) {
   36727           0 :             __Pyx_DECREF_TypeName(result_type_name);
   36728           0 :             Py_DECREF(result);
   36729           0 :             return NULL;
   36730             :         }
   36731             :         __Pyx_DECREF_TypeName(result_type_name);
   36732             :         return result;
   36733             :     }
   36734             : #endif
   36735           0 :     PyErr_Format(PyExc_TypeError,
   36736             :                  "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")",
   36737             :                  type_name, type_name, result_type_name);
   36738           0 :     __Pyx_DECREF_TypeName(result_type_name);
   36739           0 :     Py_DECREF(result);
   36740             :     return NULL;
   36741             : }
   36742           0 : static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
   36743             : #if CYTHON_USE_TYPE_SLOTS
   36744           0 :   PyNumberMethods *m;
   36745             : #endif
   36746           0 :   const char *name = NULL;
   36747           0 :   PyObject *res = NULL;
   36748             : #if PY_MAJOR_VERSION < 3
   36749             :   if (likely(PyInt_Check(x) || PyLong_Check(x)))
   36750             : #else
   36751           0 :   if (likely(PyLong_Check(x)))
   36752             : #endif
   36753           0 :     return __Pyx_NewRef(x);
   36754             : #if CYTHON_USE_TYPE_SLOTS
   36755           0 :   m = Py_TYPE(x)->tp_as_number;
   36756             :   #if PY_MAJOR_VERSION < 3
   36757             :   if (m && m->nb_int) {
   36758             :     name = "int";
   36759             :     res = m->nb_int(x);
   36760             :   }
   36761             :   else if (m && m->nb_long) {
   36762             :     name = "long";
   36763             :     res = m->nb_long(x);
   36764             :   }
   36765             :   #else
   36766           0 :   if (likely(m && m->nb_int)) {
   36767           0 :     name = "int";
   36768           0 :     res = m->nb_int(x);
   36769             :   }
   36770             :   #endif
   36771             : #else
   36772             :   if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
   36773             :     res = PyNumber_Int(x);
   36774             :   }
   36775             : #endif
   36776           0 :   if (likely(res)) {
   36777             : #if PY_MAJOR_VERSION < 3
   36778             :     if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
   36779             : #else
   36780           0 :     if (unlikely(!PyLong_CheckExact(res))) {
   36781             : #endif
   36782           0 :         return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
   36783             :     }
   36784             :   }
   36785           0 :   else if (!PyErr_Occurred()) {
   36786           0 :     PyErr_SetString(PyExc_TypeError,
   36787             :                     "an integer is required");
   36788             :   }
   36789             :   return res;
   36790             : }
   36791         338 : static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
   36792         338 :   Py_ssize_t ival;
   36793         338 :   PyObject *x;
   36794             : #if PY_MAJOR_VERSION < 3
   36795             :   if (likely(PyInt_CheckExact(b))) {
   36796             :     if (sizeof(Py_ssize_t) >= sizeof(long))
   36797             :         return PyInt_AS_LONG(b);
   36798             :     else
   36799             :         return PyInt_AsSsize_t(b);
   36800             :   }
   36801             : #endif
   36802         338 :   if (likely(PyLong_CheckExact(b))) {
   36803             :     #if CYTHON_USE_PYLONG_INTERNALS
   36804         338 :     if (likely(__Pyx_PyLong_IsCompact(b))) {
   36805         338 :         return __Pyx_PyLong_CompactValue(b);
   36806             :     } else {
   36807           0 :       const digit* digits = __Pyx_PyLong_Digits(b);
   36808           0 :       const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
   36809           0 :       switch (size) {
   36810             :          case 2:
   36811           0 :            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
   36812           0 :              return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   36813             :            }
   36814             :            break;
   36815             :          case -2:
   36816           0 :            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
   36817           0 :              return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   36818             :            }
   36819             :            break;
   36820             :          case 3:
   36821             :            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
   36822             :              return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   36823             :            }
   36824             :            break;
   36825             :          case -3:
   36826             :            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
   36827             :              return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   36828             :            }
   36829             :            break;
   36830             :          case 4:
   36831             :            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
   36832             :              return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   36833             :            }
   36834             :            break;
   36835             :          case -4:
   36836             :            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
   36837             :              return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   36838             :            }
   36839             :            break;
   36840             :       }
   36841             :     }
   36842             :     #endif
   36843           0 :     return PyLong_AsSsize_t(b);
   36844             :   }
   36845           0 :   x = PyNumber_Index(b);
   36846           0 :   if (!x) return -1;
   36847           0 :   ival = PyInt_AsSsize_t(x);
   36848           0 :   Py_DECREF(x);
   36849             :   return ival;
   36850             : }
   36851             : static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
   36852             :   if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
   36853             :     return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
   36854             : #if PY_MAJOR_VERSION < 3
   36855             :   } else if (likely(PyInt_CheckExact(o))) {
   36856             :     return PyInt_AS_LONG(o);
   36857             : #endif
   36858             :   } else {
   36859             :     Py_ssize_t ival;
   36860             :     PyObject *x;
   36861             :     x = PyNumber_Index(o);
   36862             :     if (!x) return -1;
   36863             :     ival = PyInt_AsLong(x);
   36864             :     Py_DECREF(x);
   36865             :     return ival;
   36866             :   }
   36867             : }
   36868        2302 : static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
   36869        2302 :   return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
   36870             : }
   36871             : static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
   36872             :     return PyInt_FromSize_t(ival);
   36873             : }
   36874             : 
   36875             : 
   36876             : /* #### Code section: utility_code_pragmas_end ### */
   36877             : #ifdef _MSC_VER
   36878             : #pragma warning( pop )
   36879             : #endif
   36880             : 
   36881             : 
   36882             : 
   36883             : /* #### Code section: end ### */
   36884             : #endif /* Py_PYTHON_H */

Generated by: LCOV version 1.16